Forum

Like a WHEN function

hi! i know that a WHEN function doesn't exists on MQ4, so I tried to do something like this: if(SelectLastOrder() && OrderProfit() < 0 && ((Ask - Bid * myPoint) <= MaxSpread) && _current_martingale_level < MM_Martingale_MaxLevel) { if(OrderType()==OP_BUY) if (iCustom(NULL,PERIOD_M1,"F",0,0)>F_buy)