My goal is to create a kind of 'Dashboard' to display the performance for the last 10 minutes. Ex. Rate of change of HMA 5. I am using a code to get this job done, but the code is very lengthy [may be UN-optimized]. I would like to have this 'Dashboard' done for 6 equities in ONE chart. Please see the following sample code that I use and help me with the code. Thank you!!
Def roc_Hull05 = Round(((HullMovingAvg(vwap, 5) / HullMovingAvg(vwap, 5)[1]) - 1) * 100, 2);
AddLabel(1, "Hull05 " , Color.Blue);
AddLabel(roc_Hull05[9] > 0.00 and roc_Hull05[9] <= 0.02, ".",color.violet);
AddLabel(roc_Hull05[9] > 0.02 and roc_Hull05[9] <= 0.04, "0",color.violet);
AddLabel(roc_Hull05[9] > 0.04 and roc_Hull05[9] <= 0.06, "1",color.violet);
AddLabel(roc_Hull05[9] > 0.06 and roc_Hull05[9] <= 0.10, "2",color.violet);
AddLabel(roc_Hull05[9] > 0.10 and roc_Hull05[9] <= 0.20, "3",color.violet);
AddLabel(roc_Hull05[9] > 0.20 and roc_Hull05[9] <= 0.30, "4",color.violet);
AddLabel(roc_Hull05[9] > 0.30 and roc_Hull05[9] <= 0.40, "5",color.violet);
AddLabel(roc_Hull05[9] > 0.40 and roc_Hull05[9] <= 0.50, "6",color.violet);
AddLabel(roc_Hull05[9] > 0.50, "7",color.violet);
AddLabel(roc_Hull05[9] <= 0.0, "*",color.Red);
AddLabel(roc_Hull05[8] > 0.00 and roc_Hull05[8] <= 0.02, ".",color.violet);
AddLabel(roc_Hull05[8] > 0.02 and roc_Hull05[8] <= 0.04, "0",color.violet);
AddLabel(roc_Hull05[8] > 0.04 and roc_Hull05[8] <= 0.06, "1",color.violet);
AddLabel(roc_Hull05[8] > 0.06 and roc_Hull05[8] <= 0.10, "2",color.violet);
AddLabel(roc_Hull05[8] > 0.10 and roc_Hull05[8] <= 0.20, "3",color.violet);
AddLabel(roc_Hull05[8] > 0.20 and roc_Hull05[8] <= 0.30, "4",color.violet);
AddLabel(roc_Hull05[8] > 0.30 and roc_Hull05[8] <= 0.40, "5",color.violet);
AddLabel(roc_Hull05[8] > 0.40 and roc_Hull05[8] <= 0.50, "6",color.violet);
AddLabel(roc_Hull05[8] > 0.50, "7",color.violet);
Code continous to the current minute.
Thank you Again!!
AddLabel(roc_Hull05[8] <= 0.0, "*",color.Red);
Def roc_Hull05 = Round(((HullMovingAvg(vwap, 5) / HullMovingAvg(vwap, 5)[1]) - 1) * 100, 2);
AddLabel(1, "Hull05 " , Color.Blue);
AddLabel(roc_Hull05[9] > 0.00 and roc_Hull05[9] <= 0.02, ".",color.violet);
AddLabel(roc_Hull05[9] > 0.02 and roc_Hull05[9] <= 0.04, "0",color.violet);
AddLabel(roc_Hull05[9] > 0.04 and roc_Hull05[9] <= 0.06, "1",color.violet);
AddLabel(roc_Hull05[9] > 0.06 and roc_Hull05[9] <= 0.10, "2",color.violet);
AddLabel(roc_Hull05[9] > 0.10 and roc_Hull05[9] <= 0.20, "3",color.violet);
AddLabel(roc_Hull05[9] > 0.20 and roc_Hull05[9] <= 0.30, "4",color.violet);
AddLabel(roc_Hull05[9] > 0.30 and roc_Hull05[9] <= 0.40, "5",color.violet);
AddLabel(roc_Hull05[9] > 0.40 and roc_Hull05[9] <= 0.50, "6",color.violet);
AddLabel(roc_Hull05[9] > 0.50, "7",color.violet);
AddLabel(roc_Hull05[9] <= 0.0, "*",color.Red);
AddLabel(roc_Hull05[8] > 0.00 and roc_Hull05[8] <= 0.02, ".",color.violet);
AddLabel(roc_Hull05[8] > 0.02 and roc_Hull05[8] <= 0.04, "0",color.violet);
AddLabel(roc_Hull05[8] > 0.04 and roc_Hull05[8] <= 0.06, "1",color.violet);
AddLabel(roc_Hull05[8] > 0.06 and roc_Hull05[8] <= 0.10, "2",color.violet);
AddLabel(roc_Hull05[8] > 0.10 and roc_Hull05[8] <= 0.20, "3",color.violet);
AddLabel(roc_Hull05[8] > 0.20 and roc_Hull05[8] <= 0.30, "4",color.violet);
AddLabel(roc_Hull05[8] > 0.30 and roc_Hull05[8] <= 0.40, "5",color.violet);
AddLabel(roc_Hull05[8] > 0.40 and roc_Hull05[8] <= 0.50, "6",color.violet);
AddLabel(roc_Hull05[8] > 0.50, "7",color.violet);
Code continous to the current minute.
Thank you Again!!
AddLabel(roc_Hull05[8] <= 0.0, "*",color.Red);