MetaTrader 4 Build 529 beta released with new compiler - page 16

 
artamir:

So my ctrl+F1 doesn't work :( I don't know

What is this combination supposed to do? F1 help works if it's about it.
 
ALXIMIKS:

the variable needs to be initialised.

Now all datetime needs to be initialised?

 
ALXIMIKS:

what is the combination supposed to do? F1 works if it's about that.
Thank you.
 
artamir:
Thank you.


well, i'd say you're welcome)) it's not very good actually (( a lot of discrepancies with the compiler's realities

 

Is it supposed to be that when you change the parameters of an indicator that is already running and working, by double-clicking on it,

the indicatordoes not update static variables, that's why it's not redrawn?

 

I noticed a strange thing on different computers, one with XP and another with W 7

When initializing an array inside a function, the array is not filled in all, only 0 value ...

When initializing an array globally outside of all functions, the arrays are filled completely as they should be ...

 
Give me an example of the code, please. This is most likely where the error lies.
 
Renat:
Please give us an example of the code. This is most likely where the error lies.
It works in this form...
//=====================================================================================// 
// Функция пишет комментарии 
//=====================================================================================//  
string info [];
color  cv   [];

void pr (string txt, color et)
{
int Coment = 10;

ArrayResize(info,Coment);
ArrayResize(cv,Coment  );

txt=txt+"  -"+TimeS();
for(i=Coment-1; i>=1; i--){info[i]=info[i-1]; cv  [i]=cv  [i-1];}info[0]=txt;cv[0]=et;
for(i=Coment-1; i>=0; i--)
   if(info[i]!="")
     {
      if(ObjectFind("txt"+(string)i)==-1)
      ObjectCreate ("txt"+(string)i,OBJ_LABEL,0,0,0);
      ObjectSet    ("txt"+(string)i,OBJPROP_CORNER,3);
      ObjectSet    ("txt"+(string)i,OBJPROP_XDISTANCE,10);
      ObjectSet    ("txt"+(string)i,OBJPROP_YDISTANCE,0+15*(Coment-i));
      ObjectSetText("txt"+(string)i,info[i], 10, "Verdana",cv[i]);
     }

}

It doesn't work like this.

//=====================================================================================// 
// Функция пишет комментарии 
//=====================================================================================//  
void pr (string txt, color et)
{
int Coment = 10;
string info [];
color  cv   [];
ArrayResize(info,Coment);
ArrayResize(cv,Coment  );

txt=txt+"  -"+TimeS();
for(i=Coment-1; i>=1; i--){info[i]=info[i-1]; cv  [i]=cv  [i-1];}info[0]=txt;cv[0]=et;
for(i=Coment-1; i>=0; i--)
   if(info[i]!="")
     {
      if(ObjectFind("txt"+(string)i)==-1)
      ObjectCreate ("txt"+(string)i,OBJ_LABEL,0,0,0);
      ObjectSet    ("txt"+(string)i,OBJPROP_CORNER,3);
      ObjectSet    ("txt"+(string)i,OBJPROP_XDISTANCE,10);
      ObjectSet    ("txt"+(string)i,OBJPROP_YDISTANCE,0+15*(Coment-i));
      ObjectSetText("txt"+(string)i,info[i], 10, "Verdana",cv[i]);
     }
}
 
Try ArrayInitialize at first startup.
 
VOLDEMAR:
It works like this ...

It doesn't work like this

Did it work before? I can't figure out where you declare variable i for:

for(i=Coment-1; i>=1; i--){info[i]=info[i-1]; cv  [i]=cv  [i-1];}info[0]=txt;cv[0]=et;
for(i=Coment-1; i>=0; i--)
Reason: