# Guppy Multiple Moving Average - page 3

132786

...

Pages 17-19 are about Guppy MMA oscillator (the rest of the document is worth reading too )

regards

toddanderson:

could you or someone explain the indicator

is this an average of the guppy ma or what is it calculating

thank you
Files:
3203

371

Guppy Bars!

repost later. Did not see delete post selection??

54

Name:- Guppy MMA Oscillator

Formula:-

((Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+

Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+

Mov(CLOSE,12,E)+Mov(CLOSE,15,E))-

(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+

Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+

Mov(CLOSE,50,E)+Mov(CLOSE,60,E)))*10;

(Mov((Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+

Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+

Mov(CLOSE,12,E)+Mov(CLOSE,15,E))-

(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+

Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+

Mov(CLOSE,50,E)+Mov(CLOSE,60,E)),13,E))*10;0;

MS formula can be changed to do MT4.

Thanks

132786

...

Post #17 of this thread (this one : https://www.mql5.com/en/forum/172971/page2)

Kreangast:
Name:- Guppy MMA Oscillator

Formula:-

((Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+

Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+

Mov(CLOSE,12,E)+Mov(CLOSE,15,E))-

(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+

Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+

Mov(CLOSE,50,E)+Mov(CLOSE,60,E)))*10;

(Mov((Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+

Mov(CLOSE,8,E)+Mov(CLOSE,10,E)+

Mov(CLOSE,12,E)+Mov(CLOSE,15,E))-

(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+

Mov(CLOSE,40,E)+Mov(CLOSE,45,E)+

Mov(CLOSE,50,E)+Mov(CLOSE,60,E)),13,E))*10;0;

MS formula can be changed to do MT4.

Thanks
54

Bullish:

Value1=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+Mov(CLOSE,8,E)

+Mov(CLOSE,10,E)+Mov(CLOSE,12,E)+Mov(CLOSE,15,E));

Value2=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+Mov(CLOSE,40,E)

+Mov(CLOSE,45,E)+Mov(CLOSE,50,E)+Mov(CLOSE,60,E))；

Value1-Value2>=0

Bearish:

Value1=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+Mov(CLOSE,8,E)

+Mov(CLOSE,10,E)+Mov(CLOSE,12,E)+Mov(CLOSE,15,E));

Value2=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+Mov(CLOSE,40,E)

+Mov(CLOSE,45,E)+Mov(CLOSE,50,E)+Mov(CLOSE,60,E))；

Value1-Value2<0

This MS formula to MT4.

Thanks

54

Thank Tips

132786

These formulas translate to (will refer to it as oscillator GMMA value (lime green in the GMMA oscillator from that post)) this (the == 0 left out, lets call that case a neutral trend) :
GMMA value > 0 -> bullish

GMMA value < 0 -> bearish

That is what the <30 condition does in metatrader code within the sub-loop:
for(int j=0; j<persize; j++)

{

if (periods[j]<30)

sum += iMA(NULL,0,periods[j],0,MODE_EMA,Price,i);

else sum -= iMA(NULL,0,periods[j],0,MODE_EMA,Price,i);

}

regards

Kreangast:
Bullish:

Value1=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+Mov(CLOSE,8,E)

+Mov(CLOSE,10,E)+Mov(CLOSE,12,E)+Mov(CLOSE,15,E));

Value2=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+Mov(CLOSE,40,E)

+Mov(CLOSE,45,E)+Mov(CLOSE,50,E)+Mov(CLOSE,60,E))；

Value1-Value2>=0

Bearish:

Value1=(Mov(CLOSE,3,E)+Mov(CLOSE,5,E)+Mov(CLOSE,8,E)

+Mov(CLOSE,10,E)+Mov(CLOSE,12,E)+Mov(CLOSE,15,E));

Value2=(Mov(CLOSE,30,E)+Mov(CLOSE,35,E)+Mov(CLOSE,40,E)

+Mov(CLOSE,45,E)+Mov(CLOSE,50,E)+Mov(CLOSE,60,E))；

Value1-Value2<0

This MS formula to MT4.

Thanks
54

#property indicator_separate_window

#property indicator_buffers 2

#property indicator_color1 LimeGreen

#property indicator_color2 Red

#property indicator_level1 0

#property indicator_levelcolor DarkSlateGray

extern int Price = PRICE_CLOSE;

extern int SignalPeriod = 13;

double buffer1[];

double buffer2[];

double periods[]={3,5,8,10,12,15,30,35,40,45,50,60};

int persize;

int init()

{

SetIndexBuffer(0,buffer1);

SetIndexBuffer(1,buffer2);

persize =ArraySize(periods);

return(0);

}

int deinit() { return(0); }

int start()

{

double alpha = 2.0/(1.0+SignalPeriod);

int counted_bars=IndicatorCounted();

int i,limit;

if(counted_bars<0) return(-1);

if(counted_bars>0) counted_bars--;

limit = Bars-counted_bars;

for(i=limit; i>=0; i--)

{

double sum = 0;

for(int j=0; j<persize; j++)

{

if (periods[j]<30)

sum += iMA(NULL,0,periods[j],0,MODE_EMA,Price,i);

else sum -= iMA(NULL,0,periods[j],0,MODE_EMA,Price,i);

}

buffer1 = sum*10.0;

buffer2 = buffer2+alpha*(buffer1-buffer2);

}

return(0);

}

thanks

54