Good Morning All !
Here's some early morning improvements to the code:
#1. Added the last 2 lines to the "Parameters" Section at the top of the code. You can copy paste just these 2 lines, I have shown all of these for context
// Parameters
ShowNumbers= ParamToggle("Show 1-8 Numbers","No|Yes", 1);
ShowTDPoints = ParamToggle("Show TD Points", "No|Yes", 1);
ShowTDST = ParamToggle("Show TD Setup Trend", "No|Yes", 1);
ShowBuyCountDown = ParamToggle("Show Buy TD CountDown", "No|Yes", 0);
ShowSellCountDown = ParamToggle("Show Sell TD CountDown", "No|Yes", 0);
#2. Revised the "TD Sequential Plotting area" as given below. You can replace the entire section below.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//*********************************************** TD Sequential Plotting area*************************************************/
Plot(C, "", IIf(O>=C, colorRed, colorGreen), styleBar);
PlotShapes(IIf(Buy9Intr OR Sell9Intr, shapeDigit9, shapeNone),colorBlue, 0, H, 20);
// Print Setup
if(ShowNumbers)
PlotShapes(IIf(Buy9Bars==1, shapeDigit1,
IIf(Buy9Bars==2, shapeDigit2,
IIf(Buy9Bars==3, shapeDigit3,
IIf(Buy9Bars==4, shapeDigit4,
IIf(Buy9Bars==5, shapeDigit5,
IIf(Buy9Bars==6, shapeDigit6,
IIf(Buy9Bars==7, shapeDigit7,
IIf(Buy9Bars==8, shapeDigit8,
IIf(Buy9Bars >9, shapeStar,shapeNone))))))))),colorGreen, 0, H, 10);
if(ShowNumbers)
PlotShapes(
IIf(Sell9Bars==1, shapeDigit1,
IIf(Sell9Bars==2, shapeDigit2,
IIf(Sell9Bars==3, shapeDigit3,
IIf(Sell9Bars==4, shapeDigit4,
IIf(Sell9Bars==5, shapeDigit5,
IIf(Sell9Bars==6, shapeDigit6,
IIf(Sell9Bars==7, shapeDigit7,
IIf(Sell9Bars==8, shapeDigit8,
IIf(sell9bars>9, shapeStar,shapeNone))))))))),colorRed, 0, H, 10);
// Print Countdown
if(ShowBuyCountDown)
PlotShapes(IIf(Buy13Count==1, shapeDigit1,
IIf(Buy13Count==2, shapeDigit2,
IIf(Buy13Count==3, shapeDigit3,
IIf(Buy13Count==4, shapeDigit4,
IIf(Buy13Count==5, shapeDigit5,
IIf(Buy13Count==6, shapeDigit6,
IIf(Buy13Count==7, shapeDigit7,
IIf(Buy13Count==8, shapeDigit8,
IIf(Buy13Count==9, shapeDigit9,shapeNone))))))))),colorGrey50, 0, L, -20);
if(ShowBuyCountDown)
PlotShapes(IIf(Buy13Count==10, shapeDigit0,
IIf(Buy13Count==11, shapeDigit1,
IIf(Buy13Count==12, shapeDigit2,
IIf(Buy13Count==13, shapeDigit3,shapeNone)))),colorBlue, 0, L, -20);
if(ShowSellCountDown)
PlotShapes(IIf(Sell13Count==1, shapeDigit1,
IIf(Sell13Count==2, shapeDigit2,
IIf(Sell13Count==3, shapeDigit3,
IIf(Sell13Count==4, shapeDigit4,
IIf(Sell13Count==5, shapeDigit5,
IIf(Sell13Count==6, shapeDigit6,
IIf(Sell13Count==7, shapeDigit7,
IIf(Sell13Count==8, shapeDigit8,
IIf(Sell13Count==9, shapeDigit9,shapeNone))))))))),colorGrey50, 0, L, -40);
if(ShowSellCountDown)
PlotShapes(IIf(Sell13Count==10, shapeDigit0,
IIf(Sell13Count==11, shapeDigit1,
IIf(Sell13Count==12, shapeDigit2,
IIf(Sell13Count==13, shapeDigit3,shapeNone)))),colorBlue, 0, L, -40);
Sell = Sell13Signal AND NOT BuySignal;
Buy = Buy13Signal AND BuySignal;
Sell = ExRem(Sell, Buy);
Buy = ExRem(Buy, Sell);
PlotShapes(Sell*shapeCircle, colorBlue, 0, H, 25);
PlotShapes(Sell*shapeDownArrow, colorRed, 0, H, -40);
PlotShapes(Buy*shapeCircle, colorBlue, 0, L, -5);
PlotShapes(Buy*shapeUpArrow, colorGreen, 0, L, -20);
//if(StrToNum(NumToStr(BuySignal)))
//bgColor = ColorRGB(0,66, 2);
//else
//bgColor = ColorRGB(66,2, 0);
//SetChartBkGradientFill( colorBlack, bgColor);
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//*********************************************** TD Points Plotting area*************************************************/
Change Summary: Instead of getting the chart cluttered, the TD count downs are not shown by default. To see them, go to parameters and select whether you want to see the buy count down or sell count down. The idea is that I am not able to print the count down only when it changes ... printing too much repetitive data ... so until I understand it, and once you have a complete setup, you can switch the parameters to show what you like (buy or sell). I tried but was not able to figure out how to compare the TD count for the previous bar vs the current bar - if could be done, it will make the count display even better and similar to the chart ST had.
Alright ...