i-AMMA - indicator for MetaTrader 4

A 25-hari rata-rata Modified Moving Average digunakan sebagai filter. Hal ini didefinisikan oleh Maxwell di "Perdagangan Berjangka Komoditi dengan Moving Averages".

Amma dikalikan dengan 24, kemudian tutup hari ini ditambahkan dan jumlah itu dibagi dengan 25.
AMMA's formula is:
AMMA[i] = ((AMMA.Period-1)*AMMA[i+1] + Close[i])/AMMA.Period;

//+------------------------------------------------------------------+
//|                                                      ProjectName |
//|                                      Copyright 2012, CompanyName |
//|                                       http://www.companyname.net |
//+------------------------------------------------------------------+
#property copyright "© 2007 RickD"
#property link      "www.e2e-fx.net"

#define major   1
#define minor   0

#property indicator_chart_window
#property indicator_buffers 1
#property indicator_color1  Gold

extern int MA_Period=25;

double MABuf[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void init()
  {
   SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1);
   SetIndexDrawBegin(0,MA_Period);
   SetIndexBuffer(0,MABuf);

   IndicatorShortName("AMMA ("+MA_Period+")");
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
void deinit()
  {
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
void start()
  {
   int counted_bars=IndicatorCounted();
   if(counted_bars < 0)  return(-1);
   if(counted_bars>0) counted_bars--;
   int limit=Bars-counted_bars;
   if(counted_bars==0) limit-=1+1;

   for(int i=limit; i>=0; i--)
     {
      if(i==Bars-1)
         MABuf[i]=Close[i];
      else
         MABuf[i]=((MA_Period-1)*MABuf[i+1]+Close[i])/MA_Period;
     }
  }
//+------------------------------------------------------------------+

2 Responses to "i-AMMA - indicator for MetaTrader 4"

  1. Lamanya kurang lebih 7 bulan gabung di ACY, ane dimana yang pasti tidak adanya kendala permasalahan jalankan trading forexnya, cepat masalah eksekusi, pelayanan yang ramah, dana trading terpercaya, yang pasti semoga aja ACY ini dapat di kembangkan dan di pertahankan deh ACY ini agar ane dapat lebih lama lagi untuk merasakan trading aman, nyaman bersama ACY ini

    ReplyDelete
  2. As claimed by Stanford Medical, It's in fact the one and ONLY reason women in this country get to live 10 years longer and weigh on average 42 pounds lighter than we do.

    (And actually, it really has NOTHING to do with genetics or some secret diet and EVERYTHING to do with "how" they are eating.)

    P.S, What I said is "HOW", and not "what"...

    TAP this link to uncover if this brief questionnaire can help you find out your real weight loss potential

    ReplyDelete