Predefined variable Bars is always equals to 1 in the Tester

 

While i run my EA, i use the predefined variable Bars on the void OnTick().

On my computer the variable gives accurate value but on my friend's computer, the value always result to 1.

Does anybody have an idea as to why ?

Points of interests:

  • On both computer, in the options menu, the max bars in history is 10000000 and the max bars in graph is 65000.
  • Also, the function RefreshRates() is called before just to be sure.
  • My friends platform has both a demo (active) and live account (inactive).
  • Bars equals to 1 in the Tester with and without the optimization.

Thanks

Ben

 
Benoit Dumont: While i run my EA, i use the predefined variable Bars on the void OnTick(). On my computer the variable gives accurate value but on my friend's computer, the value always result to 1. Does anybody have an idea as to why? Points of interests:

  • On both computer, in the options menu, the max bars in history is 10000000 and the max bars in graph is 65000.
  • Also, the function RefreshRates() is called before just to be sure.
  • My friends platform has both a demo (active) and live account (inactive).
  • Bars equals to 1 in the Tester with and without the optimization.

In the tester when using MT4 normally (and I call your attention to the word "normally"), then "Bars" will start off at around 1000 almost always.

However, if you use a 3rd party tool like TickStory or Tick Data Suite, to generate your FXT files, and you don't set a start date for the test, then "Bars" will start off at 1 (current bar), but will grow as the bar count goes by.

When using 3rd party FXT files, set a test start date that is beyond the starting date of the FXT file data, so that "Bars" will have a greater starting value.

 

Hi Fernando,

thanks for the information.

It was effectively the TickStory app that was making it act like this.

We were able to solve the problem.

Have a nice day.

 
Benoit Dumont #: Hi Fernando,thanks for the information. It was effectively the TickStory app that was making it act like this. We were able to solve the problem. Have a nice day.
You are welcome!
Reason: