
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
will this code work to get the proper drawdown and target 2 times the drawdown in profits
int tm, z;double lw, dd;
for (int i=0;i<OrdersTotal();i++)
{
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
tm = (TimeCurrent()-OrderOpenTime())/60;
if (OrderType()==OP_BUY)
{
lw = iLow(Symbol(),1,(iLowest(Symbol(),1,MODE_LOW,tm,0)));
dd = OrderOpenPrice()-lw;
}
if (OrderType()==OP_BUY && OrderSymbol()==Symbol())
{OrderModify(OrderTicket(),OrderOpenPrice(),OrderStopLoss(),OrderOpenPrice()+(dd*2),0,Green);}
}