is there any way to avoid the "Array out of range" error with tick inidcators which show up after some time? As far as I understand this error appears if I got more ticks than bars. The array size managed by the subsystem seems to be depending on the "Max Bars in Chart" and the history of bars downloaded from the broker. But in every case if I leave this indicator running I will get of course more ticks than bars, it's just a matter of time.
Is ther any way to clean up older values or another solution for this code?
#property indicator_buffers 1
#property indicator_plots 1
#property indicator_label1 "Bid"
#property indicator_type1 DRAW_LINE
#property indicator_color1 Blue
#property indicator_style1 STYLE_SOLID
#property indicator_width1 1
int OnCalculate(const int rates_total,
const int prev_calculated,
const int begin,
const double &price)
static int ticks=0;
Allright, I think I found it in the tick indicator article:
// Removing the first tick_stored/2 quotes and shifting remaining quotes
// Shifting the data to the beginning in the TicksBuffer array on tick_stored/2
// Changing the quotes counter