//+------------------------------------------------------------------ #property copyright "www.forex-station.com" #property link "www.forex-station.com" #property description "Wpr of Kijun-sen" #property description "From mt4 version" #property description "By Jas Wu" //+------------------------------------------------------------------ #property indicator_separate_window #property indicator_buffers 3 #property indicator_plots 1 #property indicator_label1 "Wpr of Kijun Sen" #property indicator_type1 DRAW_COLOR_LINE #property indicator_color1 clrDodgerBlue,clrRed #property indicator_style1 STYLE_SOLID #property indicator_width1 3 input int WprPeriod = 35; // WPR Period input int Kijun = 26; // Kijun Period double val[],valc[],ks[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { SetIndexBuffer(0,val, INDICATOR_DATA); SetIndexBuffer(1,valc,INDICATOR_COLOR_INDEX); SetIndexBuffer(2,ks, INDICATOR_CALCULATIONS); IndicatorSetString(INDICATOR_SHORTNAME," WPR of Kijun Sen"); return (INIT_SUCCEEDED); } void OnDeinit(const int reason) { } //+------------------------------------------------------------------+ //| 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)0) ? (val[i]>val[i-1]) ? 0 :(val[i]