Salute to all !
Maybe someone has encountered this.
In the robot, I run the Bars function.
Print("ordlife=",Bars(Symbols[s],PERIOD_D1,OrdTime[i],TimeCurrent()));
The results were correct on two different PCs until I moved the robot to another machine (MT build 1940 and OS Win 7 64bit, i7).
I compiled it there and received 5000 bars in response, although the check showed that the order setting time and the current time are determined correctly.
On all machines, the terminal is MT build 1940.
What could be the problem ?
alvin1976
Synchronization is done during initialization for all working timeframes. With subsequent verification. In my example, I substitute the current character. You should have written to me right away.
But can you explain why when you change the maximum number of bars in the window from 5000 to 20000, the “Bars” function starts working correctly ?
mvs
I Pat the steel with such dialogues)
alexeyvik
I don’t need to learn Russian. There are some words that are deliberately distorted, just for fun and not only by me.
Try to find the reason why the function does not see the history, why the data is not loaded. After all, in your example, not the current character. Is it even displayed in MarketWatch???
Forum on trading, automated trading systems and testing of trading strategies
The Bars function returns different results on different PCs
Alexey Kravchenko, 2019.01.14 13:20
I have a limit of 5000 bars. Isn’t that enough ?
Bars(Symbols[s],PERIOD_D1,TimeCurrent(),TimeCurrent()));
Returns also 5000. On other machines of course zero )
What is interesting is that everything is fine in the tester, but in real mode it is buggy….
In the tester, all symbols that are being accessed are automatically opened.
artmedia70
I don’t see any spelling or punctuation errors in Alexey. I see you have it.
And you, except for the spelling of Alexey, have nothing more to say?
Do you check for history based on the requested data? Are you checking the completion of history synchronization based on the data requested for the first time? Or do you immediately request the number of bars?
And if there is no history yet, or it is not fully synchronized, what should Bars () return in this case?
alvin1976
Yes, with such a large rating as you can probably write for everyone…. Russian language is only left to learn 🙂
alexeyvik
I want to clarify the name of the topic. “Ambushes of the MT5 terminal at Kravchenko”.
The others don’t have ambushes. Especially those.
alvin1976
I have a limit of 5000 bars. Isn’t that enough ?
Bars(Symbols[s],PERIOD_D1,TimeCurrent(),TimeCurrent()));
Returns also 5000. On other machines of course zero )
What is interesting is that everything is fine in the tester, but in real mode it is buggy….
mocris
Possible due to setting the maximum number of bars on the chart