i have this
extern double TakeProfit_Buy = 4.0;
extern double TakeProfit_Sell = 4.0;
i would like to add a stoploss function to it.
but whatever i try i dont get it to work. could anybody lend a helping hand and explain to me how i can add it?
thank you
extern double TakeProfit_Buy = 4.0;
extern double TakeProfit_Sell = 4.0;
Inserted Code
case OP_BUY : if ( OrderProfit() >= TakeProfit_Buy) result = OrderClose( OrderTicket(), OrderLots(), MarketInfo(OrderSymbol(), MODE_BID), 5, Red ); break;
i would like to add a stoploss function to it.
but whatever i try i dont get it to work. could anybody lend a helping hand and explain to me how i can add it?
thank you