how to use MA as breakeven?
breakeven? to what?
double MAF=iMA(Symbol(),0,MAPeriod,0,MAMethod,MAPrice,i); OrderModify(OrderTicket(),OrderOpenPrice(),NormalizeDouble(OrderOpenPrice()+MAF*point,digits),OrderTakeProfit(),0,Blue);fex: i would like to use MAF variable as BE
The break-even of an order is where the OrderProfit()==0. You cannot use any value iMA gives you.
Perhaps you're looking for a trailing-stop when order profit is greater than or equal zero?
fulltilt:
how to use MA as breakeven?
- a MA has nothing to do with break even. If you mean using a MA as a stop loss
double MAF=iMA(Symbol(),0,MAPeriod,0,MAMethod,MAPrice,i); OrderModify(OrderTicket(),OrderOpenPrice(),MAF,OrderTakeProfit(),0,Blue);
OrderOpenPrice()+MAF*pointprice + price * point is meaning less
how to use MA as breakeven?