11351[/ATTACH]']
Hi, I am planning to create a customised watchlist that plots the positions of the moving average with the help of labels
Currently, i have to spilt this script into 6 different plots so that it can assign a label with color when the conditions are met as show in the pic
I tried to insert the entire script in the custom code formula, but ONLY 1 plot will be shown
Can i request assistance to help me edit the script so that it will automatically assign each box with the right label whenever the conditions are met
Plot Trend1 = MovAvgExponential(close, 13);
Trend1.AssignValueColor(if close > Trend1 then Color.GREEN else Color.RED);
Trend1.SetLineWeight(1);
Plot Trend2 = MovAvgExponential(close, 34);
Trend2.AssignValueColor(if close > Trend2 then Color.GREEN else Color.RED);
Trend2.SetLineWeight(2);
plot L1 = close >trend1 and trend1>trend2;
addlabel(yes, if L1 >=1.0 then "S1" else "",color.black);
assignbackgroundcolor(if L1 >=1.0 then color.green else color.black);
plot L2 = close <trend1 and close>trend2 and trend1>trend2;
assignbackgroundcolor(if L2 >=1.0 then color.green else color.black);
plot L3 = close<trend2 and trend1>trend2;
addlabel(yes, if L3 >=1.0 then "S3" else "",color.black);
assignbackgroundcolor(if L3 >=1.0 then color.red else color.black);
plot L4= close < Trend1 and Trend1< trend2;
addlabel(yes, if l4 >=1.0 then "S4" else "",color.black);
assignbackgroundcolor(if l4 >=1.0 then color.green else color.black);
plot L5 = close > Trend1 and close<trend2 and Trend2 > Trend1;
addlabel(yes, if L5 >=1.0 then "S5" else "",color.black);
assignbackgroundcolor(if L5 >=1.0 then color.green else color.black);
plot L6 = close > Trend1 and close > trend2 and trend2> trend1;
addlabel(yes, if L6 >=1.0 then "S6" else "",color.black);
assignbackgroundcolor(if L6 >=1.0 then color.green else color.black);
Thank you
Hi, I am planning to create a customised watchlist that plots the positions of the moving average with the help of labels
Currently, i have to spilt this script into 6 different plots so that it can assign a label with color when the conditions are met as show in the pic
I tried to insert the entire script in the custom code formula, but ONLY 1 plot will be shown
Can i request assistance to help me edit the script so that it will automatically assign each box with the right label whenever the conditions are met
Plot Trend1 = MovAvgExponential(close, 13);
Trend1.AssignValueColor(if close > Trend1 then Color.GREEN else Color.RED);
Trend1.SetLineWeight(1);
Plot Trend2 = MovAvgExponential(close, 34);
Trend2.AssignValueColor(if close > Trend2 then Color.GREEN else Color.RED);
Trend2.SetLineWeight(2);
plot L1 = close >trend1 and trend1>trend2;
addlabel(yes, if L1 >=1.0 then "S1" else "",color.black);
assignbackgroundcolor(if L1 >=1.0 then color.green else color.black);
plot L2 = close <trend1 and close>trend2 and trend1>trend2;
assignbackgroundcolor(if L2 >=1.0 then color.green else color.black);
plot L3 = close<trend2 and trend1>trend2;
addlabel(yes, if L3 >=1.0 then "S3" else "",color.black);
assignbackgroundcolor(if L3 >=1.0 then color.red else color.black);
plot L4= close < Trend1 and Trend1< trend2;
addlabel(yes, if l4 >=1.0 then "S4" else "",color.black);
assignbackgroundcolor(if l4 >=1.0 then color.green else color.black);
plot L5 = close > Trend1 and close<trend2 and Trend2 > Trend1;
addlabel(yes, if L5 >=1.0 then "S5" else "",color.black);
assignbackgroundcolor(if L5 >=1.0 then color.green else color.black);
plot L6 = close > Trend1 and close > trend2 and trend2> trend1;
addlabel(yes, if L6 >=1.0 then "S6" else "",color.black);
assignbackgroundcolor(if L6 >=1.0 then color.green else color.black);
Thank you