Any way to make a watchlist column that shows when a stock goes "long" or "short"?
My apologies. I made the assumption that by looking at the chart the words "Long" and "Short" would have been enough to know which indicator I was referring to. That said, here's the script and if possible, the watchlist column would include the words "Long" or "Short" at the time they appear on the chart.
# AsGoodAsItGets Indicator without Arrows
#CSR Buy/Sell Arrows with Short/Long Bubbles
#Developed 4-9-22 First Edition 8-23-22 Revised
#No Arrow Edition 1/1/23
declare upper;
input atrreversal = 2.0;
def priceh = MovingAverage(AverageType.EXPONENTIAL, high, 5);
def pricel = MovingAverage(AverageType.EXPONENTIAL, low, 5);
def EIL = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastL;
def EIH = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = .01, "absolute reversal" = .05, "atr length" = 5, "atr reversal" = atrreversal).lastH;
plot signaldown = !isNAN(EIH);
AddChartBubble(SignalDown, high+.15, "Short", Color.White, yes);
plot signalrevBot = !isNaN(EIL);
AddChartBubble(Signalrevbot, low-.15, "Long", Color.White, no);
input usealerts = yes;
alert(usealerts and signaldown[1] == 1, "Short", alert.bar, sound.ring);
alert(usealerts and signalrevbot[1] == 1, "Long", alert.bar, sound.ring);