stop losses not showing up in backtest

 
im trying a basic stochastic EA which works great until it doesn't.
I've put just a stop loss in the input variables clicked Ok but the stop loss doesn't show when back testing.
anything silly I've missed?
 
andyduvall:
im trying a basic stochastic EA which works great until it doesn't.
I've put just a stop loss in the input variables clicked Ok but the stop loss doesn't show when back testing.
anything silly I've missed?
How do you want us to know ? By guessing ? Provide us details, show the code and / or logs, maybe a link, possibly a screenshot.
 
hi
I'll have to get a screen shot later.

Basically I've added a stop loss in the input variables but it doesn't show on the chart.
I'll experiment with some more stop losses.
 
andyduvall:
hi
I'll have to get a screen shot later.

Basically I've added a stop loss in the input variables but it doesn't show on the chart.
I'll experiment with some more stop losses.

Are you checking the Deal execution mode for the symbol you are trading ?  for some modes you cannot send the SL or TP with the order,  you have to send it afterwards . . .  follow this link and scroll down a little till you see:  Request Execution

This is what I currently do,  it's not exhaustive but it may give you an idea/starting point . . .  

   if(SymbolInfoInteger(_Symbol, SYMBOL_TRADE_EXEMODE) == SYMBOL_TRADE_EXECUTION_MARKET || 
      SymbolInfoInteger(_Symbol, SYMBOL_TRADE_EXEMODE) == SYMBOL_TRADE_EXECUTION_EXCHANGE) 
         {
         Comment("ECN = true ");
         ECN = true;
         }
 
Thanks
my programming is very rusty. But I do recall that the SL goes in after the code is returned from the server that the trade has been placed.
Cheers
Andrew
 
andyduvall:
Thanks
my programming is very rusty. But I do recall that the SL goes in after the code is returned from the server that the trade has been placed.
Cheers
Andrew
It doesn't have to,  it depends on the Deal execution mode, for example with Request execution,  Instant execution and Pending orders  the SL & TP can be sent with the Order.  Are you testing the retrn value from the OrderSend and also reading the returned result for any specific errors ?
 
hi

I cheated with this one and put it together in fxdreema.
Looks like I'm gonna have to spend some time with mql5.
Reason: