no-image

Implementation method when you want to run EA at regular intervals

◎ Functional specifications
EA is executed at regular time intervals instead of TICK units.

◎ Detailed specifications

//Initial processing
int OnInit ()
{
// Timer setting at 1 hour interval
EventSetTimer (3600);
return (0);
}

// Disposal processing
void OnDeinit (const int reason)
{
// Discard timer
EventKillTimer ();
return;
}

// timer function
void OnTimer ()
{
// Write the content you want to process at regular intervals.
return;
}

◎ Remarks

When performing a backtest,OnTimer function time interval is not reflectedpattern.

Therefore, note that if implemented with OnTimer function, verification by backtest will be difficult.

Translate »