Guppy Multiple Moving Averages Indicator for ThinkorSwim

D

diazlaz

Member
VIP
Warehouse
I ported the Guppy Multiple Moving a few months back, interested to see what you all can do with it to enhance it or maybe even identify potential trading plans and setup.

It's quite an interesting indicator; can be used to observe the patterns and ribbons across various timeframes, to formulate trend direction. Useful across all time frames and style of trading.

Quite a bit of patterns can be developed, and if you observe it enough reusable patterns form with ribbons and color overlap.

Please comment with your experiences and ideas. More information is available here.

MSFT - 1 Minute (Intraday)



SPX - 1 Minute (Intraday)



SPX - 1 Hour/6 Months (Swing Trading)



Code:
#Guppy Multiple Moving Averages
#Daryl Guppy, an Australian trader who is credited with its development.
#
#https://www.investopedia.com/terms/g/guppy-multiple-moving-average.asp
#Discussion: https://usethinkscript.com/threads/guppy-multiple-moving-averages-indicator.732/
#
#Ported on 20190427 V.01 - diazlaz
#

input period0 = 1;
input period1 = 3;
input period2 = 5;
input period3 = 8;
input period4 = 10;
input period5 = 12;
input period6 = 15;
input period7 = 30;
input period8 = 35;
input period9 = 40;
input period10 = 45;
input period11 = 50;
input period12 = 60;
input AvgType = AverageType.Exponential;
input data = close;
input seperator = 1.00;

script Avg
{
input AvgType = AverageType.Exponential;
input length = 10;
input data = close;
plot MA = MovingAverage(AverageType = AvgType, data = close, length = length);
}


DefineGlobalColor("Up", Color.GREEN);
DefineGlobalColor("Down", Color.RED);
DefineGlobalColor("NUp", Color.DARK_GREEN);
DefineGlobalColor("NDown", Color.DARK_RED);
DefineGlobalColor("Neutral", Color.BLUE);

DefineGlobalColor("G1", CreateColor(42,137,71));
DefineGlobalColor("G2", CreateColor(54,156,72));
DefineGlobalColor("G3", CreateColor(69,176,73));
DefineGlobalColor("G4", CreateColor(96,195,85));
DefineGlobalColor("G5", CreateColor(129,215,102));
DefineGlobalColor("G6", CreateColor(164,235,122));
DefineGlobalColor("R1", CreateColor(235,24,9));
DefineGlobalColor("R2", CreateColor(222,34,35));
DefineGlobalColor("R3", CreateColor(209,56,66));
DefineGlobalColor("R4", CreateColor(196,75,91));
DefineGlobalColor("R5", CreateColor(183,91,109));
DefineGlobalColor("R6", CreateColor(170,105,122));

HidePricePlot(yes);

plot MA0 = Avg(AvgType = AvgType, data = data, length = period0);
plot MA1 = Avg(AvgType = AvgType, data = data, length = period1);
plot MA2 = Avg(AvgType = AvgType, data = data, length = period2);
plot MA3 = Avg(AvgType = AvgType, data = data, length = period3);
plot MA4 = Avg(AvgType = AvgType, data = data, length = period4);
plot MA5 = Avg(AvgType = AvgType, data = data, length = period5);
plot MA6 = Avg(AvgType = AvgType, data = data, length = period6);
plot MA7 = Avg(AvgType = AvgType, data = data, length = period7);
plot MA8 = Avg(AvgType = AvgType, data = data, length = period8);
plot MA9 = Avg(AvgType = AvgType, data = data, length = period9);
plot MA10 = Avg(AvgType = AvgType, data = data, length = period10);
plot MA11 = Avg(AvgType = AvgType, data = data, length = period11);
plot MA12 = Avg(AvgType = AvgType, data = data, length = period12);

MA0.SetDefaultColor(COLOR.LIME);

MA1.SetDefaultColor(GlobalColor("G1"));
MA2.SetDefaultColor(GlobalColor("G2"));
MA3.SetDefaultColor(GlobalColor("G3"));
MA4.SetDefaultColor(GlobalColor("G4"));
MA5.SetDefaultColor(GlobalColor("G5"));

MA7.SetDefaultColor(COLOR.RED);
MA7.SetLineWeight(2);

MA8.SetDefaultColor(GlobalColor("R2"));
MA9.SetDefaultColor(GlobalColor("R3"));
MA10.SetDefaultColor(GlobalColor("R4"));
MA11.SetDefaultColor(GlobalColor("R5"));
MA12.SetDefaultColor(GlobalColor("R6"));

MA1.HideTitle();
MA2.HideTitle();
MA3.HideTitle();
MA4.HideTitle();
MA5.HideTitle();
MA6.HideTitle();
MA7.HideTitle();
MA8.HideTitle();
MA9.HideTitle();
MA10.HideTitle();
MA11.HideTitle();
MA12.HideTitle();

MA2.HideBubble();
MA3.HideBubble();
MA4.HideBubble();
MA5.HideBubble();
MA6.HideBubble();
MA8.HideBubble();
MA9.HideBubble();
MA10.HideBubble();
MA11.HideBubble();
MA12.HideBubble();

# End Code Guppy Multiple Moving Averages
Safe and Healthy trading!
 
Last edited by a moderator:
D

diazlaz

Member
VIP
Warehouse


Thought the guppy looked like this?
Very nice with the clouds. I find it without the clouds its easier to spot the ribbon and touch points between the lines, when in a 4x4 or 4x8 grid, with multiple timeframes. In this edition, the candles and price chart is hidden exposing the ribbons. lower time frames are highlighted in green and higher timeframes in red, allowing for a clear delineation of when the lower ribbons cross with the higher timeframe ribbons.

 
H

horserider

Well-known member
VIP
Warehouse
Ah ok I see thanks for explaining the color scheme.
 
markos

markos

Well-known member
VIP
Warehouse
Thanks for keeping the Guppy in the Style that the original Author meant it to be. I've seen way too many people mess with it's intent.

To all: Please read the link to Investopedia at the top. It explains how Mr Guppy meant for it to be used. Thanks!
 
Last edited:

Top