Hello Vladimir, Pardon I solve the copytime problem, I was allocating it inside a loop thats why it was not working.
But Copybuffer with fractal indicator is still showing a long string. Here is the details with variable allocation & its type:
int handle_fractal,FractalBar = 5;
double fractal_up[],fractal_down[];
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[])
{
handle_fractal = iFractals(_Symbol, PERIOD_CURRENT);
ArraySetAsSeries (fractal_down, true);
ArraySetAsSeries (fractal_up, true);
for(int f = 0; f<=FractalBar; f++)
{
//--- get the data
CopyBuffer(handle_fractal, LOWER_LINE, f, 1, fractal_down);
if(fractal_down[f]!= 0) // Current chart Dwn
Do something
}
//--- return value of prev_calculated for next call
return(rates_total);
}
Even if I don’t use the loop, use the plain code as following:
//--- get the data
CopyBuffer(handle_fractal,LOWER_LINE, 1, 1, fractal_down);
printf(DoubleToString(fractal_down[0],_Digits));
it still prints a long string of data:
2017.05.04 14:46:38.647 Indicator MT5 (GBPUSD,M4) 179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368.00000000