mql5 Expert advisor onTick()

 

When I make indicator, I got this params:

int OnCalculate(const int rates_total, 
                const int prev_calculated, 
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{}

How can I get the same params when I make Expert Advisor using onTick() function ?

Thanks

 
waza123:

When I make indicator, I got this params:

How can I get the same params when I make Expert Advisor using onTick() function ?

Thanks

The event handler OnCalculate() is used only inside indicators. When you are using expert advisors it is replaced by the event handler OnTick(). So you cannot use both at the same time.
 
Malacarne:
The event handler OnCalculate() is used only inside indicators. When you are using expert advisors it is replaced by the event handler OnTick(). So you cannot use both at the same time.

yes i know it, but I need rates_total and high[] low[] in OnTick() to do something like that onTick(){ double x = high[rates_total-300]; }


is there any way to do it ?

 
waza123:

yes i know it, but I need rates_total and high[] low[] in OnTick() to do something like that onTick(){ double x = high[rates_total-300]; }


is there any way to do it ?

CopyHigh() to get high[] and Bars for rates_total.
 
angevoyageur:
CopyHigh() to get high[] and Bars for rates_total.
thanks, will try.
Reason: