Download MetaTrader 5
To add comments, please log in or register
Make screenshots in MetaTrader and manage them in the gallery!
jeon su man
62
jeon su man 2016.01.14 14:50 

Hi,

i have some bug in my indicator so i'm debugging but i have some question.

following is parts of code .

when debugging step through i want to see result on the chart immediately.

but when this code executed OBJ_TEXT not updated on the chart immediately.

i inputed Sleep function for check whether it can make update TEXT object on the chart but also it couldn't updated.

are there any possible way to update chart immediately?

thanks

   ObjectCreate(objprefix+" "+text[s]+" ("+bar+")", OBJ_TEXT, 0, Time[bar],High[bar]+ UPhilo* x);
    Sleep(2000);
   ObjectSetText(objprefix+" "+text[s]+" ("+bar+")","UT", 8, "Arial", DeepSkyBlue);
    Sleep(2000);
   ObjectSet(objprefix+" "+text[s]+" ("+bar+")", OBJPROP_COLOR, icolor);

Carl Schreiber
5934
Carl Schreiber 2016.01.14 15:38  
The debugger doesn't work with indicators! Either use an EA or a script!!
jeon su man
62
jeon su man 2016.01.14 16:11  

sorry but some weird because when i hit F5 or start debugging button in MetaEditor 4 build 1241 ,i can debug indicator and can step through .

pls correct me what is wrong.

are there any trick or method to use history data when debugging?

thanks much

Carl Schreiber
5934
Carl Schreiber 2016.01.14 18:04  

1) To my experience the debugger doesn't really work for indicators - but I can't remember what was the problem, I just don't do it any more.

2) You can debug with the candles of the chart but not with the historic data of the Strategy Tester (Mt4 has started to think about enabling this - but they are still thinking).

jeon su man
62
jeon su man 2016.01.15 00:47  

now debugger support debugging indicator as far as i know. but sometimes have bug .

are there any command exist to  give time to EA or indicator to update object create time on the chart?

if i can see debugging result on the chart real time it would be great.

/
To add comments, please log in or register