Can someone please help me to add customization colors of AvgExpLine as well as slingshotSignal?
Description of Slingshot Indicator can be found here.
https://www.thestocktails.com/the-slingshot/
Slingshot Pullback Setup explanation video.
Slingshot Indicator ThinkScript
https://tos.mx/6cdTDnA
Description of Slingshot Indicator can be found here.
https://www.thestocktails.com/the-slingshot/
Slingshot Pullback Setup explanation video.
Slingshot Indicator ThinkScript
https://tos.mx/6cdTDnA
Code:
#Code written by TA Plot https://twitter.com/TaPlot
#Written on 02/27/2021
#Slingshot concept was shared by https://twitter.com/Scot1andT when he was
#interviewed by https://twitter.com/RichardMoglen
#here is the interview for reference #https://twitter.com/RichardMoglen/status/1365426016177577993
#
input price = High;
input length = 4;
def AvgExp = ExpAverage(price, length);
def slingshot = close > AvgExp and close[1] < AvgExp[1] and close[2] < AvgExp[2] and close[3] < AvgExp[3];
plot AvgExpLine = AvgExp;
AvgExpLine.SetDefaultColor(GetColor(1));
AvgExpLine.AssignValueColor(if slingshot then color.white else color.current);
AvgExpLine.HideBubble();
#plot white dot on candle close when a slingshot exists
Plot slingshotSignal = slingshot;
slingshotSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_POINTS);
slingshotSignal.AssignValueColor(color.white);
slingshotSignal.SetLineWeight(3);
Last edited: