######################################################################### # EminiAddict.com # slashgw $TICK chart "inspired" by the Shadowtrader Iceberg $TICK ;) # 20230426 # ____ ____ _____ # ..'''' | .'. ..'''' | | | ~. | |`````````, .-~ ~. # .'' | .''```. .'' |_________| |____.'_ |______ |'''|''''' : # ..' | .' `. ..' | | | ~. | | `. : _____ # ....'' |_______ .' `. ....'' | | |_______.' |___________ | `. `-._____.' # # input thresholdLvl = 400; #hint thresholdLvl: value to use for High & Low tick (DH's 400) input XthresholdLvl = 800; #hint XthresholdLvl: value to use for Extreme High & Low tick (DH's 800) input enableAD = No; #hint enableAD: 'Yes' to enable Advance-Decline line (DH's 'No') input hideCloudBorder = Yes; #hint hideCloudBorder: 'Yes' to hide the borders of the Red/Green cloud (DH's Yes) input hideZeroLine = Yes; #hint hideZeroLine: 'Yes' to hide the zero level (DH's Yes) input enableTickSMA = Yes; #hint enableTickSMA: 'Yes' to enable the 1 period SMA for $TICK input enableDHmode = Yes; #hint enableDHmode: 'Yes' to enable cloud display similar to DH's screen input enableESprice = Yes; #hint enableESprice: 'Yes' to display ES price when at/beyond the extreme levels input index = "/ES"; #hint index: default index to use for values referenced in previous setting input setLineThickness = 3; #input hidePrice = Yes; # *** Keep this "Yes" so that the actual candles remain hidden *** HidePricePlot(Yes); def indexHigh = if enableESprice then high(index) else Double.NaN; def indexLow = if enableESprice then low(index) else Double.NaN; def indexOpen = if enableESprice then open(index) else Double.NaN; def indexClose = if enableESprice then close(index) else Double.NaN; def lowLimit = if low < -XthresholdLvl then 1 else 0; def highLimit = if high > XthresholdLvl then 1 else 0; plot pltESlow = if enableESprice && lowLimit then indexLow else Double.NaN; pltESlow.SetPaintingStrategy(PaintingStrategy.VALUES_BELOW); pltESlow.SetDefaultColor(Color.YELLOW); plot pltEShigh = if enableESprice && highLimit then indexHigh else Double.NaN; pltEShigh.SetPaintingStrategy(PaintingStrategy.VALUES_ABOVE); pltEShigh.SetDefaultColor(Color.YELLOW); plot upper = thresholdLvl; upper.SetDefaultColor(Color.CYAN); upper.SetLineWeight(setLineThickness); plot lower = -thresholdLvl; lower.SetDefaultColor(Color.CYAN); lower.SetLineWeight(setLineThickness); plot Xupper = XthresholdLvl; Xupper.SetDefaultColor(Color.RED); Xupper.SetLineWeight(setLineThickness); plot Xlower = -XthresholdLvl; Xlower.SetDefaultColor(Color.RED); Xlower.SetLineWeight(setLineThickness); plot zero = 0; zero.SetDefaultColor(Color.DARK_GRAY); zero.SetLineWeight(setLineThickness-2); zero.SetHiding(hideZeroLine); plot plus = if high > 0 then high else 0; plus.SetDefaultColor(Color.GREEN); plus.SetLineWeight(setLineThickness); plus.SetHiding(hideCloudBorder); plot minus = if low < 0 then low else 0; minus.SetDefaultColor(Color.RED); minus.SetLineWeight(setLineThickness); minus.SetHiding(hideCloudBorder); plot ADSPDC = If(enableAD, close("$ADSPDC"), Double.NaN); ADSPDC.SetDefaultColor(Color.YELLOW); ADSPDC.SetPaintingStrategy(PaintingStrategy.LINE); ADSPDC.SetLineWeight(2); plot tickSMA = If(enableTickSMA, Average(close(), 1), Double.NaN); tickSMA.SetDefaultColor(Color.WHITE); tickSMA.SetPaintingStrategy(PaintingStrategy.LINE); tickSMA.SetLineWeight(3); def cloudHigh = if enableDHmode then plus else tickSMA; def cloudLow = if enableDHmode then minus else tickSMA; AddCloud(cloudHigh, 0, Color.GREEN, Color.RED); AddCloud(0, cloudLow, Color.RED, Color.GREEN); AddLabel(!IsNaN(close), "$TICK: " + close, if close > 0 then Color.LIGHT_GREEN else Color.LIGHT_RED); # ***** The lines below display labels when A/D is at an extreme level. On bullish trending days, anything above +375 on $ADSPDC is BTD mode # meaning, don't expect the sky to fall because it's unlikely to. And the opposite goes when A/D is -375 on a bearish trending day. Rips # will usually be sold as long as A/D remains lower than negative 375 (-375). Don't fight either one of these unless you have a very valid reason. AddLabel(enableAD && ADSPDC > +375, "A/D mode: BTD", Color.LIGHT_GREEN); # 'BTD', well you already know what that is, lol AddLabel(enableAD && ADSPDC < -375, "A/D mode: STR", Color.LIGHT_RED); # 'STR' is 'Sell the Rip'