EA does well in backtest but does not open any trade in real

[Deleted]  

Hi,

I just made a EA which seems to be profitable in backtesting (it opens and closes positions) but when i activated it in my demo account it just don't open any trade however all criteria are met.

In the backtest it opens about 6 trades a day, but in my demo it has not opened anything in 2 days.

Is there a way to troubleshoot this ?

thnx

[Deleted]  
Do you have error checking in your ea? what does the journal say?
[Deleted]  
Viffer:
Do you have error checking in your ea? what does the journal say?


I'm writing buy and close actions with all current variables to a log file but nothing is logged.

The journal does not show any activity or error's either.

That's what frustrating me. I'm not (yet) really familiar with a good troubleshooting method.

Maybe you have some hints in the right direction ...

thnx

[Deleted]  

Just before your order send... put in an alert or print to confirm that the code has got that far through your code... after the ordersend, call https://docs.mql4.com/check/GetLastError and print the result (if it's not zero)... and that will be a start.

V

 

You probably have a broker that forbids sending TP and SL in the same command as the trade entry. Take a look at my post here.

[Deleted]  
gatornuke:

You probably have a broker that forbids sending TP and SL in the same command as the trade entry. Take a look at my post here.


Yep, i'm with an ECN broker.

I have worked around that by doing a modification after the trade has been opened.

That's not the issue. (failed trades are in the journal)

@viffer that's a nice one i haven't thought off before. thnx will try that.