Download MetaTrader 5
To add comments, please log in or register
Do you want to learn MQL5? 300 articles will help you!
marcelo marques pereira
75
marcelo marques pereira 2015.03.20 20:47 

Hi , 

I would like to know if there is a way to deactivate the "auto Styler" in the Metaeditor .. I just noticed that since the last version(I believe) if I have a source code like this:

int start()   {
   
   if(Bars <= drawBegin) return (0);
   int countedBars=IndicatorCounted();
   if(countedBars < 0) return (-1);
   if(countedBars>0) countedBars--;
   int s,limit=MathMin(Bars-countedBars-1,Bars-drawBegin);

   for(s=limit; s>=0; s--)    {
      L0[s] = (1.0 - Gamma) * P(s) + Gamma * L0[s + 1];
      L1[s] = -Gamma * L0[s] + L0[s + 1] + Gamma * L1[s + 1];
      L2[s] = -Gamma * L1[s] + L1[s + 1] + Gamma * L2[s + 1];
      L3[s] = -Gamma * L2[s] + L2[s + 1] + Gamma * L3[s + 1];
      Filter[s]=(L0[s]+2.0*L1[s]+2.0*L2[s]+L3[s])/6.0;
      FIR[s]=(P(s)+2.0*P(s+1)+2.0*P(s+2)+P(s+3))/6.0;

      if(s>Bars-drawBegin-2)        {
         L0[s] = P(s);
         L1[s] = P(s);
         L2[s] = P(s);
         L3[s] = P(s);
         Filter[s]=P(s);      }  }

 

 the Metaeditor is changing its format to :

 

int start() 
  {
   if(Bars <= drawBegin) return (0);
   int countedBars=IndicatorCounted();
   if(countedBars < 0) return (-1);
   if(countedBars>0) countedBars--;
   int s,limit=MathMin(Bars-countedBars-1,Bars-drawBegin);

   for(s=limit; s>=0; s--)
     {
      L0[s] = (1.0 - Gamma) * P(s) + Gamma * L0[s + 1];
      L1[s] = -Gamma * L0[s] + L0[s + 1] + Gamma * L1[s + 1];
      L2[s] = -Gamma * L1[s] + L1[s + 1] + Gamma * L2[s + 1];
      L3[s] = -Gamma * L2[s] + L2[s + 1] + Gamma * L3[s + 1];
      Filter[s]=(L0[s]+2.0*L1[s]+2.0*L2[s]+L3[s])/6.0;
      FIR[s]=(P(s)+2.0*P(s+1)+2.0*P(s+2)+P(s+3))/6.0;

      if(s>Bars-drawBegin-2)
        {
         L0[s] = P(s);
         L1[s] = P(s);
         L2[s] = P(s);
         L3[s] = P(s);
         Filter[s]=P(s);
        }
   }

 

(*Note the brackets) 

 

Technically, it's  cleaerer than the old version however I have a couple of codes with another kind of formatting that are getting messged up ;;

Thank you! 

Keith Watford
Moderator
7862
Keith Watford 2015.03.20 20:58  

Auto-Styler?

I'm not aware that it is done automatically.

Surely, unless you select it from the menu or press Ctrl+","  nothing is changed?

marcelo marques pereira
75
marcelo marques pereira 2015.03.20 23:48  

GumRai ,i 

I just opened a few mql4 codes that I haven't touched for ages and they got updated..even though I never pressed Ctrl+"," .. Do you know if MT4 changed sth in the last version?

Keith Watford
Moderator
7862
Keith Watford 2015.03.21 00:03  

As I tend to use the same style as the styler, I wouldn't notice.

But if I download an mq4 file and open it and it has the same style as your first example, it is not changed. 

marcelo marques pereira
75
marcelo marques pereira 2015.03.22 11:25  
Thank you GumRai, I will try t re-install the platform in another folder.. if someone else had experienced such issue, please let me know. Have a great sunday!
/
To add comments, please log in or register