Alberto Tortella: One way is to compare the OrderClosePrice() with
OrderTakeProfit() and OrderStoploss(), but may be there is a smarter way.
-
bool closeBySL = MathAbs( OrderClosePrice() - OrderStopLoss() ) < MathAbs( OrderClosePrice() - OrderTakeProfit() );
- Not a good idea to use comments, brokers can change comments,
including
complete replacement. Not all brokers modify comments with
[SL] or [TP]

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
Hi all, is there a quick way to check in the Order History if an order was closed @ tale profit (green) or @ stop loss (red) ?
One way is to compare the OrderClosePrice() with OrderTakeProfit() and OrderStoploss(), but may be there is a smarter way.
Thank you!