how to get more data in tester?

 

I wrote a Indictor whitch need more than 10k bars to get a appropriate signal..

But in test I always get only 1000 bars to start.

I use code below to show how many bars really in my tester chart.

Print(__FUNCTION__," bar=",bars_in_use," rates_total=",rates_total," prev_calculated=",prev_calculated, " iBars=",iBars(NULL,0));

The result like this "2017.10.29 17:35:21.838    2017.02.01 00:11:00  chanline EURUSD,M1: OnCalculate bar=1000 rates_total=1012 prev_calculated=1011 iBars=1012"

I add a ma buffer like this.

   for(int i=0;i<count;i++)
     {
      bf_ma[i]=iMA(NULL,0,5000,0,MODE_EMA,PRICE_CLOSE,i);
     }

to see if the tester could give me more when my Indicator need it.

The test give me only 1000 bars as before.

Could any one who knows how the tester worked tell me how "

Or just tell me it's impossible to get more bars ?

 

As you are using obviously MT4 I can tell you to google for either "TickStory Lite" and/or TickDownloader and/or (Birt's EAReview:) csv2fxt.

 
Ma Yuliang: But in test I always get only 1000 bars to start.
Of course it does, (and it use to be only 100.) Don't do anything until you get your minimum.
 
Ma Yuliang:

The test give me only 1000 bars as before.

Could any one who knows how the tester worked tell me how "

Or just tell me it's impossible to get more bars ?

Yes, this is a known feature of the tester.

You should add an input parameter to your expert/indicator, which will take actual starting date of analysis (this parameter is for tester only!). Then skip all bars with earlier dates. Of course you should beforehand calculate how many days it takes to collect sufficient number of bars according to your work timeframe, and shift tester start date to this point. Unfortunately this is the only way based solely on the tester data (without external files).

Reason: