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.
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:
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.
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
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 ?
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
hi
I cheated with this one and put it together in fxdreema.
Looks like I'm gonna have to spend some time with mql5.
I cheated with this one and put it together in fxdreema.
Looks like I'm gonna have to spend some time with mql5.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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?