I am testing my EA using the strategy tester and I have been getting a wierd issue. This is for dec 12 3550 build. metatrader demo account
I noticed that when I run the EA withought visual mode on, it missed trades. So when visual mode is on, it takes all of the trades.
I narrowed this issue down to one of my indicators, using print funciton when I run the tester(every tick and 1 min ohlc), the indicator is getting a completely different value. The other two indicators I used for testing has the right value regardless of visual or non visual mode, one of which uses icustom as well.
But when I run the EA with visual mode on, the indicator has the right values and takes the trades. I am using Icustom to get that indicator
and the curreOneBar, has the indicators value. When comparing the visual and non visual, for AUDCAD, it is completely different.
I have tried reinstalling and reinstalling mt5 with all data wiped, still had the same issue.
Then I tried it with another indicator(iCustom), and the same issue, the visual was correct, and the non visual was not, it said the indicators value was something that I couldnt even find moving the mouse around the chart.
For extra context, the indicator values are called (//this is in another method part of the code above), is called once per day only.
Essentially the tester has the correct trades only when visual mode is turned on. Does anyone have any idea about this issue?
oh never mind, figured it out
Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?
How To Ask Questions The Smart Way. (2004)
When You Ask.
Follow up with a brief note on the solution.
Don't do that. Someone searching might find this thread and still be clueless. What was the problem? What solved what?
How To Ask Questions The Smart Way. (2004)
When You Ask.
Follow up with a brief note on the solution.
so I used
#property tester_everytick_calculate
as well as adjust my code so that the indicator gets tick info each time rather then in a specific time frame as I originally had.
And managed to make it work, however there are probably more efficient ways of doing it, as it did effect my runtime quite a bit at first.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am testing my EA using the strategy tester and I have been getting a wierd issue. This is for dec 12 3550 build. metatrader demo account
I noticed that when I run the EA withought visual mode on, it missed trades. So when visual mode is on, it takes all of the trades.
I narrowed this issue down to one of my indicators, using print funciton when I run the tester(every tick and 1 min ohlc), the indicator is getting a completely different value. The other two indicators I used for testing has the right value regardless of visual or non visual mode, one of which uses icustom as well.
But when I run the EA with visual mode on, the indicator has the right values and takes the trades. I am using Icustom to get that indicator
and the curreOneBar, has the indicators value. When comparing the visual and non visual, for AUDCAD, it is completely different.
I have tried reinstalling and reinstalling mt5 with all data wiped, still had the same issue.
Then I tried it with another indicator(iCustom), and the same issue, the visual was correct, and the non visual was not, it said the indicators value was something that I couldnt even find moving the mouse around the chart.
For extra context, the indicator values are called (//this is in another method part of the code above), is called once per day only.
Essentially the tester has the correct trades only when visual mode is turned on. Does anyone have any idea about this issue?