LatvianFX:
Loop through the trades in the history, select them one by one, check their OrderCloseTime() to find the most recent, once you have the most recent find it's type using Ordertype() and then check it's OrderClosePrice() and compare it against it's OrderStopLoss() to try and determine it was closed by SL.
Hello!
I need help with my expert advisor.
I want to detect wether previos trade was stoped out by stop loss and what was the opening type (BUY or SELL) of previous order.
I need this becaus i don't want to open new trade immidiatly after previous trade was stoped by sl.
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
Hello!
I need help with my expert advisor.
I want to detect wether previos trade was stoped out by stop loss and what was the opening type (BUY or SELL) of previous order.
I need this becaus i don't want to open new trade immidiatly after previous trade was stoped by sl.
thanx