How to test OnCalculate and OnTick on Sunday and Saturday

 

I am really busy on the trading day.

So could only code some script on Saturday and Sunday.

Then I found there is no sigle come in.OnCalculate and OnTick could only draw indicator on histroy data.

Could any one know how to test Indicator script on Sunday?

 
//+------------------------------------------------------------------+
//| Timer function                                                   |
//+------------------------------------------------------------------+
void OnTimer()
  {
   OnTick();
  }
 
Marco vd Heijden:

It's really a good idea.

I wrote OnCalculation in OnTimer too.

void OnTimer()
  {
//---

   datetime arrTime[];
   double   arrOpen[],arrHigh[],arrLow[],arrClose[];
   long      arrTickVolume[],arrVolume[];
   int      arrSpread[];
   ArrayCopy(arrTime,Time,0,0,WHOLE_ARRAY);
   ArrayCopy(arrOpen,Open,0,0,WHOLE_ARRAY);
   ArrayCopy(arrHigh,High,0,0,WHOLE_ARRAY);
   ArrayCopy(arrLow,Low,0,0,WHOLE_ARRAY);
   ArrayCopy(arrClose,Close,0,0,WHOLE_ARRAY);
   ArrayCopy(arrVolume,Volume,0,0,WHOLE_ARRAY);
   CopyTickVolume(Symbol(),0,0,Bars-1,arrTickVolume);
   CopySpread(Symbol(),0,0,Bars-1,arrSpread);
   OnCalculate(Bars,0,arrTime,arrOpen,arrHigh,arrLow,arrClose,arrTickVolume,arrVolume,arrSpread);
  }
Reason: