Steven / Publications
Forum
Ignored Stoploss During Backtest
My stoploss was ignored during the backtest , does anyone know why the price just went through the stoploss? thanks
OrderSend Error: 130
double stopLossPrice = NormalizeDouble(High[2]-0.2*(High[2]-Low[2]),Digits); double takeProfitPrice = NormalizeDouble(High[2]+0.8*(High[2]-Low[2]),Digits); double lotSize = OptimalLotSize(riskPerTrade,NormalizeDouble(High[2]+0.1*(High[2]-Low[2]),Digits),stopLossPrice); openOrderID =