AdamantBidoof
New member
So I took the indicator from @germanburrito and combine it with this video here
So this is a 200 sma Keltner channel with open high and low as a zone area of interest.
I've combine it with my version of ghost fibs from https://usethinkscript.com/threads/ghost-pivots-for-thinkorswim.9870/
and trade /es and /nq on 3min, 10,min 30min, and 1 hour.
Code:
# Indicator that presents ATR 5,10,15 above and below using Keltner channel formula
input displace = 0;
input factor1 = 5.0;
input factor2 = 10.0;
input factor3 = 15.0;
input length1 = 200;
input price = close;
input length2 = 200;
input price2 = high;
input length3 = 200;
input price3 = low;
input averageType = AverageType.SIMPLE;
input trueRangeAverageType = AverageType.SIMPLE;
def lenght1 = factor1 * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length1);
def lenght2 = factor2 * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length1);
def lenght3 = factor3 * MovingAverage(trueRangeAverageType, TrueRange(high, close, low), length1);
plot average1 = MovingAverage(averageType, close, 200);
average1.SetDefaultColor(GetColor(4));
plot average2 = MovingAverage(averageType, high, 200);
average1.SetDefaultColor(GetColor(4));
plot average3 = MovingAverage(averageType, low, 200);
average1.SetDefaultColor(GetColor(4));
plot SMA1 = average1[-displace] + lenght1[-displace];
SMA1 .SetDefaultColor(GetColor(6));
plot SMA2 = average1[-displace] + lenght2[-displace];
SMA1 .SetDefaultColor(GetColor(0));
plot SMA3 = average1[-displace] + lenght3[-displace];
SMA1 .SetDefaultColor(GetColor(5));
plot SMAH1 = average2[-displace] + lenght1[-displace];
SMA1 .SetDefaultColor(GetColor(6));
plot SMAH2 = average2[-displace] + lenght2[-displace];
SMA1 .SetDefaultColor(GetColor(0));
plot SMAH3 = average2[-displace] + lenght3[-displace];
SMA1 .SetDefaultColor(GetColor(5));
plot SMAL1 = average3[-displace] + lenght1[-displace];
SMA1 .SetDefaultColor(GetColor(6));
plot SMAL2 = average3[-displace] + lenght2[-displace];
SMA1 .SetDefaultColor(GetColor(0));
plot SMAL3 = average3[-displace] + lenght3[-displace];
SMA1 .SetDefaultColor(GetColor(5));
plot Lower_Band1 = average1[-displace] - lenght1[-displace];
Lower_Band1 .SetDefaultColor(GetColor(6));
plot Lower_Band2 = average1[-displace] - lenght2[-displace];
Lower_Band2 .SetDefaultColor(GetColor(0));
plot Lower_Band3 = average1[-displace] - lenght3[-displace];
Lower_Band3.SetDefaultColor(GetColor(5));
plot Lower_Band1H = average2[-displace] - lenght1[-displace];
Lower_Band1 .SetDefaultColor(GetColor(6));
plot Lower_Band2H = average2[-displace] - lenght2[-displace];
Lower_Band2 .SetDefaultColor(GetColor(0));
plot Lower_Band3H = average2[-displace] - lenght3[-displace];
Lower_Band3.SetDefaultColor(GetColor(5));
plot Lower_Band1L = average3[-displace] - lenght1[-displace];
Lower_Band1 .SetDefaultColor(GetColor(6));
plot Lower_Band2L = average3[-displace] - lenght2[-displace];
Lower_Band2 .SetDefaultColor(GetColor(0));
plot Lower_Band3L = average3[-displace] - lenght3[-displace];
Lower_Band3.SetDefaultColor(GetColor(5));
Addcloud(average2, average3, color.yellow, color.yellow);
Addcloud(smaH1, smaL1, color.green, color.green);
Addcloud(smaH2, smaL2, color.Pink, color.pink);
Addcloud(smaH3, smaL3, color.red, color.red);
Addcloud(Lower_Band1H, Lower_Band1L, color.green, color.green);
Addcloud(Lower_Band2H, Lower_Band2L, color.Pink, color.pink);
Addcloud(Lower_Band3H, Lower_Band3L, color.red, color.red);
The code a bit of a mess haha, but I tried with the limited knowledge I have in copy pasta coding haha
Last edited by a moderator: