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
What about positive slippage?
spread != deviation (slippage)
It is a shame it is not possible to retrieve the deviation parameter.
Probably a reasonable compromise is (presuming the EA placed the order) to check whether DEAL_PRICE was within a window of ORDER_SL ± deviation
Here I am lost. This topic is about identifying if an SL/TP was triggered on server side.
How is that related with spread or deviation ?
Sorry but I don't understand what you mean ?
Here I am lost. This topic is about identifying if an SL/TP was triggered on server side.
How is that related with spread or deviation ?
Well, I'm lost on the spread side of things.
But, my understanding is that once a SL is hit it becomes a market order and filled at the best possible price. That is subject to slippage, no?
Yes Alain, Jose right, I think more reasonable if DEAL_PRICE <= close_price (for buy) and DEAL_PRICE >= close_price (for sell)
What is DEAL_PRICE and what is close_price ?
Well, I'm lost on the spread side of things.
But, my understanding is that once a SL is hit it becomes a market order and filled at the best possible price. That is subject to slippage, no?
Although I have undermined my own argument for an "acceptable range", because best possible price may well be outside the deviation parameter inside the EA.
Nevertheless, it could be positive slippage.
Well, I'm lost on the spread side of things.
But, my understanding is that once a SL is hit it becomes a market order and filled at the best possible price. That is subject to slippage, no?
Yes but my question was about spread/deviation, not slippage.
So yes theoretically it becomes a market order, but certainly not filled at best possible price. But that's not the problem discussed here.
The problem with MT5 is the current stoploss is not available in history. As stated by Jose, the initial stoploss is available, but it you change it later, there is no way to know.
So once you position is close, there is no way to know from history what was the stoploss, you can of course know the close price, but with what will you compare it to check if a stoploss was triggered ?
I mean DEAL_PRICE is HistoryDealGetDouble(ticket,DEAL_PRICE) and close_price is HistoryOrderGetDouble(ticket,ORDER_SL)
It's not working, see my post above.