//+------------------------------------------------------------------+ //| Power of NZD.mq4 | //| Jan Opočenský | //| | //+------------------------------------------------------------------+ #property copyright "Jan Opočenský" #property link "" #property version "R050120" #property strict #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Red double Power_of_NZD_Buffer[]; int i; int pos; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int OnInit() { //--- indicator buffers mapping ------------------ IndicatorBuffers(1); SetIndexBuffer(0,Power_of_NZD_Buffer); SetIndexStyle(0,DRAW_LINE,EMPTY,2); //------------------------------------------------ //******************************************************************** //******************************************************************** 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[]) { //---------------------------------------- pos=Bars-IndicatorCounted(); //---------------------------------------- for (i=0;i