//------------------------------------------------------------------ #property copyright "© mladen, 2018" #property link "mladenfx@gmail.com" #property version "1.00" //------------------------------------------------------------------ #property indicator_separate_window #property indicator_buffers 2 #property indicator_plots 1 #property indicator_label1 "Fractals chaos oscillator" #property indicator_type1 DRAW_COLOR_LINE #property indicator_color1 clrSilver,clrLimeGreen,clrOrchid #property indicator_width1 2 #property indicator_minimum -1 #property indicator_maximum 1 double val[],valc[]; int _fractalHandle; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { SetIndexBuffer(0,val,INDICATOR_DATA); SetIndexBuffer(1,valc,INDICATOR_COLOR_INDEX); _fractalHandle=iFractals(_Symbol,0); if(_fractalHandle==INVALID_HANDLE) return(INIT_FAILED); IndicatorSetString(INDICATOR_SHORTNAME,"Fractals chaos oscillator"); return(INIT_SUCCEEDED); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ 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[]) { if(Bars(_Symbol,_Period)