Hello
I made EA for trading with day range and it is working as i want. It is depending on daily range and takes the high and the low of day candle, i attached the EA on 1H TF and takes the day H&L using below instruction, but i noticed something, when i attache the EA to 1H TF as example on any chart but did not open day chart to refresh it with new values, at first time Range2D variable shows at first time 0 value and after shows the correct value, i know that was stored values in computer and not from server, but i want to refresh the rate from the server if i did not open the day chart, i mean i dont want to see 0 value at first time but i want to see the correct value at first without attaching the EA to day chart. I used Refreshrate() with Sleep(500) after Start() function but nothing changed.
I hope you understood me .
Search for posts about error 4066 and read . . .
But if i do as example bool CASE= RefreshRates() and read the case on comment, the CASE gives 0 that means it is false bool RefreshRates() Refreshing of data in pre-defined variables and series arrays. This function is used when expert advisor has been calculating for a long time and needs data refreshing. Returns TRUE if data are refreshed, otherwise returns FALSE. The only reason for data cannot be refreshed is that they are the current data of the client terminal.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello
I made EA for trading with day range and it is working as i want. It is depending on daily range and takes the high and the low of day candle, i attached the EA on 1H TF and takes the day H&L using below instruction, but i noticed something, when i attache the EA to 1H TF as example on any chart but did not open day chart to refresh it with new values, at first time Range2D variable shows at first time 0 value and after shows the correct value, i know that was stored values in computer and not from server, but i want to refresh the rate from the server if i did not open the day chart, i mean i dont want to see 0 value at first time but i want to see the correct value at first without attaching the EA to day chart. I used Refreshrate() with Sleep(500) after Start() function but nothing changed.
I hope you understood me .