Can you post or help me to locate the "Spark Up / Down arrow" code? I have searched for a while and cannot locate it. Thank you in advance. BTW, thank you for your instructions, They really helped me the last couple of trading days.
No problem sir.
Spark code is near the very bottom. (Of course the arrows in settings are labeled spark up spark down) the code is based on stacked EMAs
####################################################################################################################################################
#EMA_Candles
#Created by Christopher84 11/30/2021
input showBreakoutSignals = no;
input length8 = 10;
input length9 = 35;
input show_ema_cloud = yes;
plot AvgExp8 = ExpAverage(price[-displace], length8);
def UPD = AvgExp8[1] < AvgExp8;
AvgExp8.SetStyle(Curve.SHORT_DASH);
plot AvgExp9 = ExpAverage(price[-displace], length9);
def UPW = AvgExp9[1] < AvgExp9;
AvgExp9.SetStyle(Curve.short_dash);
def Below = AvgExp8 < AvgExp9;
def Spark = UPD + UPW + Below;
def UPEMA = AvgExp8[1] < AvgExp8;
def DOWNEMA = AvgExp8[1] > AvgExp8;
AvgExp8.AssignValueColor(if UPEMA then Color.LIGHT_GREEN else if DOWNEMA then Color.RED else Color.YELLOW);
def UPEMA2 = AvgExp9[1] < AvgExp9;
def DOWNEMA2 = AvgExp9[1] > AvgExp9;
AvgExp9.AssignValueColor(if UPEMA2 then Color.LIGHT_GREEN else if DOWNEMA2 then Color.RED else Color.YELLOW);
AddCloud(if show_ema_cloud and (AvgExp9 > AvgExp8) then AvgExp9 else Double.NaN, AvgExp8, Color.light_RED, Color.CURRENT);
AddCloud(if show_ema_cloud and (AvgExp8 > AvgExp9) then AvgExp8 else Double.NaN, AvgExp9, Color.light_GREEN, Color.CURRENT);
def UP8 = UPEMA and UPEMA2;
def DOWN8 = DOWNEMA and DOWNEMA2;
def priceColor8 = if UP8 then 1
else if DOWN8 then -1
else 0;
def UP11 = UPEMA;
def DOWN11 = DOWNEMA;
def priceColor11 = if UP11 then 1
else if DOWN11 then -1
else 0;
def UP12 = UPEMA2;
def DOWN12 = DOWNEMA2;
def priceColor12 = if UP12 then 1
else if DOWN12 then -1
else 0;
def UpCalc = (priceColor == 1) + (priceColor2 == 1) + (priceColor8 == 1) + (priceColor10 == 1);
def StrongUpCalc = (priceColor == 1) + (priceColor2 == 1) + (priceColor10 == 1) + (priceColor12 == 1);# + (priceColor12 == 1);
def CandleColor = if (priceColor2 == 1) and (Spark >= 2) then 1
else if (priceColor2 == -1) and (Spark < 2) then -1
#else if ((PriceColor8[2] == 1) and (PriceColor8 == 1)) then 1
#else if ((PriceColor8[2] == -1) and (PriceColor8 == -1))then -1
#else if (priceColor2 == 1) then 1
#else if (priceColor2 == -1) then -1
else 0;
#AssignPriceColor(if Color_Candles and (CandleColor == 1) then Color.GREEN else if Color_Candles and (CandleColor == -1) then Color.RED else Color.GRAY);
plot SparkUP = (Spark == 3) and (CandleColor == 1);
SparkUP.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
SparkUP.AssignValueColor(Color.LIGHT_GREEN);
plot SparkDN = (Spark == 0) and (CandleColor == -1);
SparkDN.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SparkDN.AssignValueColor(Color.RED);