EA is working perfectly on Strategy Tester(Every tick based on real ticks) but does not work properly while using it on a demo account.
Seanny234:
My EA is programmed to open a trade and close the trades in exactly 3 minutes time. The EA works perfectly on the strategy tester(Every tick based on real ticks) however it didn't work while testing it on demo, it keeps closing the trades after about a minute. I tried removing the iBars , but the EA would just go on to open multiple trades, instead of the supposed amount. The code is attached below. I'd really appreciate if anyone can help. Thank you!!!
PositionOpenTime and TimeLocal are not in the same time zone.
You should use TimeCurrent instead of TimeLocal.
Thank you so much Dominik, I will try that now and give you feedback.
Thank you so much Dominik, it's working perfectly!!!

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
My EA is programmed to open a trade and close the trades in exactly 3 minutes time. The EA works perfectly on the strategy tester(Every tick based on real ticks) however it didn't work while testing it on demo, it keeps closing the trades after about a minute. I tried removing the iBars , but the EA would just go on to open multiple trades, instead of the supposed amount. The code is attached below. I'd really appreciate if anyone can help. Thank you!!!