Hi
I am getting the error message invalid stops err 130 i.e.
I print out my values and they are as follows
2006.06.29 13:15:05 AUDUSD,H1: OrderDetails: SellPrice : 0.731 ,CurrentBid : 0.731 ,stoploss : 0.7319 ,takeprofit : 0.7291 ,slippage : 2
I am using the following to check my sl and tp before placing the order
Code:
/
if (StopLoss<=MarketInfo(Symbol(),MODE_STOPLEVEL)) StopLoss=MarketInfo(Symbol(),MODE_STOPLEVEL)+3;
if (TakeProfit<=MarketInfo(Symbol(),MODE_STOPLEVEL)) TakeProfit=2*(MarketInfo(Symbol(),MODE_STOPLEVEL)+3);
Sometimes the sell goes through like the following
2006.06.29 08:32:56 AUDUSD,H1: open #5976740 sell 0.01 AUDUSD at 0.7309 sl: 0.7324 tp: 0.7278 ok
Maybe my stops checking is just not functioning correctly.
Any suggestions?