"to get the correct information is need to wait until next tick"
you observe correctly - next data tick kicks code into action.
example:
I have indicator which draws horizontal lines using objects. Part of the 'pre-drawing loop' setup has:
dYmax = NormalizeDouble(WindowPriceMax(),Digits);
dYmin = NormalizeDouble(WindowPriceMin(),Digits);
until next incoming data tick the lines/objects remain
ie, the code does not run to remove old period's lines/objects and recalculate for the new periodocity.
Above is what I observe in my chart if change periods.
hth
"to get the correct information is need to wait until next tick"
you observe correctly - next data tick kicks code into action.
example:
I have indicator which draws horizontal lines using objects. Part of the 'pre-drawing loop' setup has:
dYmax = NormalizeDouble(WindowPriceMax(),Digits);
dYmin = NormalizeDouble(WindowPriceMin(),Digits);
until next incoming data tick the lines/objects remain
ie, the code does not run to remove old period's lines/objects and recalculate for the new periodocity.
Above is what I observe in my chart if change periods.
hth
thanks for your answer, but i need to clarify this.....
the script start() RUN'S just after you press the M1 toolbox button or any other.
see the example here and the explanation "WindowsPriceMax Problem"
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
WindowsPriceMax(), is not updated with the correct information provided when the user click's the M1,M5,M15,30 or any Period Toolbox button.
to get the correct information is need to wait until next tick.
but, all other data like Period(), returns correct.
This is MetaTraderBug?
i have writen an exaple showing this behavior here,
'WindowsPriceMax problem'
Thanks for ur help.
Arturo.