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
int total = OrdersTotal();
for (int i = 0; i < total; i++)
{
OrderSelect(i, SELECT_BY_POS);
if (OrderClosePrice() <= OrderStopLoss() + 0.0005)
{
OrderModify( OrderTicket(), NULL, Ask - 40 * Point, OrderTakeProfit(), 0, Aqua);
}
}
What were doing here is modifying the stop loss if the close price of a particular order falls to 5 pips above the stop loss. My Question is what if the close price of this order falls beyond the stop loss level completely, thereby closing the order; will this code still be executed?
Basically what I'm doing is modifying the stop loss level so that the order doesn't close if the price falls, so that were still in the trade.