stop loss limit is not executed in strategy tester
the market chart has a MIN VALUE for stoploss and takeprofit...
double initial_stop_loss_limit=0.0010;
This is a very small stoploss limit , its possible that is under the min. value.
this is what i use
double StopLevel=(MarketInfo(Symbol(),MODE_STOPLEVEL)*Point);
double MinStop=(5*Point);
double BandasuperiorSTOP=(ActualAsk+StopLevel+MinStop); //formula for .....STOPLOSS for sell
double BandainferiorSTOP=(ActualBid-StopLevel-MinStop); //formula for ....STOPLOSS for buy
...................................................
double stop_loss_limit=NormalizeDouble(OrderOpenPrice()+initial_stop_loss_limit,Digits); bool order_modified=OrderModify(OrderTicket(),OrderOpenPrice(),stop_loss_limit,OrderTakeProfit(),0,clrMagenta);You buy at the Ask. You aren't adjusting for the spread. Use OrderClosePrice.
hello,
i hav ebuild a simple strategy tester, but I can't figure out why the stop loss limits are simply not executed in the strategy tester. the take profit limit in contrary is being executed.