No you can only know after the new last bar has opened with it's open price.
Not before so even if price goes over or drops below your TP and SL values nothing will happen until the new last bar open price comes in and this is where it differs from ticks.
So your order will be closed, or a new order will be opened only when a new bar opens that breached the values of your triggers.
No you can only know after the new last bar has opened with it's open price.
Not before so even if price goes over or drops below your TP and SL values nothing will happen until the new last bar open price comes in and this is where it differs from ticks.
So your order will be closed, or a new order will be opened only when a new bar opens that breached the values of your triggers.
Thank you for the reply.
Maybe I should rephrase the question. I mean if OPO method knows nothing else than just OHLC of candle prices, then how it can determine for the trades in the range of its completed candle, they have been closed with SL or TP ??
I mean maybe OPO knows and uses more information than just OHLC of candles? Is it true ?
This depends are you talking about SL and TP levels residing on the trading server side, or are you talking about SL and TP triggers that reside on the trading terminal side ?
These are two different things, of course if your triggers are set on the trading server they will obey every tick, but if you keep your levels hidden from your broker then they will only obey bar open price when it is coded to deal with bar open only.
Now bar open means bar open it does not mean bar close or bar high or bar low so it can not be more then just bar open.
If you run only bar open then thats what it will be so unless you code it to deal with other prices but then it would not be bar open only obviously.
This depends are you talking about SL and TP levels residing on the trading server side, or are you talking about SL and TP triggers that reside on the trading terminal side ?
When we test an EA which is designed to work on 'bar open', we can test it with OPO or with 'every tick' or with 'control points'. The other methods use more information than OHLC of candles. It is obvious.
But what about OPO method ? I want to assert MT4 OPO strategy tester mode, if relies on OHLC of testing time frame candles, can not determine which one of SL or TP has been triggered.
If it is true then OPO how works.
can not determine SL or TP has been triggered.
This depends on :
This depends are you talking about SL and TP levels residing on the trading server side, or are you talking about SL and TP triggers that reside on the trading terminal side ?
To determine if anything has been changed, can only be done after a new bar.
Also:
Farshad Rezvan:
It does not rely on OHLC but just O .
In this mode, first, bar is opened (Open = High = Low = Close, Volume=1)
What about MT4 Strategy tester OPO method ? I am asking about strategy tester not EA design!
It's the same thing.
Either your EA is coded to only work with open times or your EA is not coded to work with open times but you set strategy tester to open times only.
It's the same thing.
Even if your EA would rely on anything else then open time it would not be available when run strategy tester open mode only.
Or when your EA IS coded to run open only then you can even set it to on tick it should still results open only but with a lot of wasted time in between for the ticks that are not handled.
It's the same thing.
No. It is our EA that relies on O, Open Price.
What about MT4 Strategy tester OPO method ? I am asking about strategy tester not EA design!
Anyway Marco is right, use "Open prices only" testing mode only if your strategy relies on new candle (Open) for both opening and closing your trades.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have an EA works on the last bar completed events, as described in this article: https://www.mql5.com/en/articles/1511. So I would like to test it with Open Prices Only (OPO) method. In the two pictures here, If EA places a BUYSTOP at the end of the first bar with predefined SL and TP, now after completion of the second bar, if the pending order's open price, and also both of its SL and TP, were in the range of the second bar, then strategy tester OPO method, how understands that SL have been reached first or the TP one ? I want to validate output of Strategy Tester in OPO mode !
Thank you