Are you experiencing this on the Live Account?
Results may differ between the strategy tester (backtest) and live account because of the length of data used and the conditions of your strategy. How long have you tried it on the live account?
Leave the EA to run on the live account for about a week or two. Then download the same data for the week or two and run the strategy test with the EA. If the results differ then we can begin to look at the code logic.
Hello Obike,
Thanks for your reply.
I did precisely that. I left it running many days -- more than one week -- and NO trades on the live account, whereas on the strategy tester the conditions were triggered multiple times.
So the comparison is pretty simple: NO trades versus MANY...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello Everyone,
I'm developing my first EA.
I got to write one, and it works perfectly well on the strategy tester.
My EA does the following:
I specify a pair of currencies, say currency1 and currency2.
When it starts, the EA buys immediately the currency1.
Afterwards, it checks the conditions A & B. If either condition is true, the EA sells currency1 and buys currency2.
From there on, it will check which currency is the opened-buy position, checks conditions and then accordingly switches from one to the other, so I'm always bought on one of the two currencies.
1) On the strategy tester, it does everything I want. No warning messages. All trades clear and clean. All prints and alerts printed as they should.
2) On the demo/live account: it does the first immediate buy. (so, yes, autotrading is on, my demo account accepts EAs performing orders, there is money available to buy)
3) But then... nothing. I changed the conditions so the switch (sell + buy) would be as often as possible, and not a single trade was performed. Only the first buy.
What could be the issue?
Below, I'll post the code that might be the problem.
Any lights?
I appreciate your time!
Thanks