Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Yes, there is an obvious solution — place the trade when the market is open!
In other words, your EA code, must wait for the opening time (e.g. 00:05 or whatever the session start time may be).
That also means, that you will not be able to test with the modelling method using "Open prices only" on a daily time-frame. You will need to use the "1 minute OHLC" or one of the "Every tick" methods.
Another indirect method, is to change the contract specifications in the tester and remove any session time limits so that the market is always open.
However, this is not a realistic emulation of what will happen on a live account, so I don't recommend it. Use it only for quick evaluations.
Another indirect method, is to change the contract specifications in the tester and remove any session time limits so that the market is always open.
However, this is not a realistic emulation of what will happen on a live account, so I don't recommend it. Use it only for quick evaluations.
Thanks Fernando, this was the quickest. As you say, just for quick evaluations.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greets,
I've been trying my hand at writing MQL5 EAs for a while now and everything works as expected. I've always used the strategy tester on intra-day timeframes, but recently decided to give the Daily TF a try.
Problem is the strategy tester always fails to place any test trades because the trades are placed at midnight, eg, 2023.02.15 00:00:00 - when the market is closed of course.
Forgive me if there's an obvious solution to this (short of hand-coding the EA to detect if Daily bars are being used and adjust accordingly). Surely there's an elegant solution to this?
Thanks