//+------------------------------------------------------------------+ //| Moving Average PHI.mq5 | //| Demar Rodrigues | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Demar Rodrigues" #property link "https://www.mql5.com" #property version "1.00" #property indicator_chart_window #property indicator_buffers 1 #property indicator_plots 1 #property indicator_type1 DRAW_LINE #property indicator_color1 Purple //--- input parameters input int InpMAPeriod=17; //--- indicator buffers double ExtLineBuffer[]; //+------------------------------------------------------------------+ //| Média Móvel Simples com a proporção áurea - PHI | //+------------------------------------------------------------------+ void CalculateSimpleMA(int rates_total,int prev_calculated,int begin,const double &price[]) { int i,limit; //--- first calculation or number of bars was changed if(prev_calculated==0)// first calculation { limit=InpMAPeriod+begin; //--- set empty value for first limit bars for(i=0;i