Hi Csricksdds,I'm sorry- I set my TopsBottoms on 9 and my TurningPointArrows on 15
Can you please explain what is your strategy and other indicators you use along with this indicator?
Hi Csricksdds,I'm sorry- I set my TopsBottoms on 9 and my TurningPointArrows on 15
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thanks for your comments. As stated in previous posts my trading is geared towards the SPY (occasionally the QQQ's) and my indicators have been put together, and/or modified, to help increase the probability for success trading those two ETFs. For years I traded the market at large but find the SPY more profitable with less stress on a daily basis. I'm well aware of the repainting issue and only share these indicators in the hope they can be of benefit and/or help raise the probability for success with anyone else.
We moved to The Villages, FL nine years ago (large retirement community) and have found that a Senior Citizen with their left turn signal indicator on has very little to do with whether they actually turn left or not? The probabilities get better if they also slow down and move towards the left lane although I have seen right turns from there as well.
My AGAIG indicators have helped me raise the probability for personal success. When two or three give the same trend change indication is where my trades are placed, or exited. If the market decides something different than indicated I immediately exit the trade. It has been my experience that my AGAIG indicators are much more accurate than what I personally think the market might do!
Since the SPY now has daily expirations my preference is trading the ORB, and trends, until about noon. Past experience tells me that It's easy to make money in the morning and give it all back in the afternoon.
Suggestions on how to improve, or set better parameters, on my AGAIG indicators is always appreciate
Why the ZigZag...it fit my indicator and is a good tool for reversals? There is a lot of discussion around repaint/doesn't repaint. To me a repaint does show transitions in the market...an indicator that does not repaint isn't as sensitive to these changes (at least in my thinking I don't want something static when the market is constantly changing and not static). Life repaints and so does the market. Unless one has enough money to move the market in the direction they choose, we are subject to the market as it chooses to go, which is why I like multiple indicators suggesting direction and price movement.Thank you for sharing your indicator. I really like the name too. I’m fairly new to options trading but took the leap to being full time trader and immerse. It’s been a tough journey but finally reached my daily trading profit goals consistently. My next goal is to have the option to trade from my watch. Your indicator fits my day trading setup and grateful for it. Right now, I combine your indicator with golden cross, vwap, pivot trend reversal indicator alerts that monitor and ocr screenshots of the charts and message center gadget window which feed into a custom dashboard excel spreadsheet so I can calculate my entry and exit point and automate my mouse and keyboard actions up to the point to when I do the “submit” of the entry/exit trade. I use ntfy to send custom push notifications to my desktop phone and watch. I’m 90% towards my goal. I seem to get the best results when I see less charts and more number data that I can find patterns then automate using 3rd party tools. I’m not a coder but can integrate tools. That’s why I like your lower indicator and how it displays just a line. Less is not more. Less is better. Thank you again.
/OG
from Texas
Questions:
1. Why and how did you choose the ZigZag formula for AGAIG? How long did it take you?
2. After watching repainting in real-time during live and back dates, I now have a feel of the ones that will and will not repaint and more often I’m right but cant seem to quantify that feeling. Any suggestions? I look forward to repainting signals as it give me a chance to do this.
3. What personal benefits have you had with VIP membership? The cost is still a lot to me and was curious on your view.
Should work - I can't send my chart as it has other proprietary indicators on it - here is the HiLo code turning point arrows:Hi @csricksdds
For some reason the long code for the HighLoPivotPoints does not work when I paste it in my ToS. Do you have share chart link with the indicators that you use? Thanks
The input length is 15 so it will show highest/lowest last 15 day (or bars if you set for lower time frame). I currently trade a 3min chart so things show differently -Hi @csricksdds... I like your indicator so far on the daily chart. However, I have a strange problem. The SPX has been up 5 days in a row now but the indicator never displayed in Up Arrow on July 10th or 11th. Would you happen to know why? Much obliged!
View attachment 19148
@csricksdds per your comment above, could you link, and share what course in ThinkScript you did take, if it is currently available. I would be grateful, Best Wishes, MagicQuotes. Sounds like we have a good deal in common regards any coding we undertake. I am totally autodidactic and isolated. With appreciation MagicquotesI took a course in ThinkScript but certainly not an expert. It takes me hours, and sometimes days, to do scripting (which hopefully keeps my aging brain active and functioning).
I took the course from thinkscripter.com (I don't think site still works). Eric Purdy from SimplerTrading taught the course but it is no longer in their store. You might email them and see if they can get it for you. I lost it when my hard drive crashed two years ago.@csricksdds per your comment above, could you link, and share what course in ThinkScript you did take, if it is currently available. I would be grateful, Best Wishes, MagicQuotes. Sounds like we have a good deal in common regards any coding we undertake. I am totally autodidactic and isolated. With appreciation Magicquotes
Is this available for TOS mobile?5/2/23 New Lower Chart Version: https://usethinkscript.com/threads/...art-set-up-for-thinkorswim.13902/#post-124715
That I don't know as I've not used on mobile?Is this available for TOS mobile?
I placed this on a 1 min chart and nothing is showing up. Can you show a screenshot of what it should look like please?AsGood_HighLowPointPivot_Arrows
Code:##AsGood_HighLowPointPivot_Arrows def bn = BarNumber(); def na = double.nan; input length = 7; def lastBar = HighestAll(if IsNaN(close) then 0 else bn); def offset = Min(length - 1, lastBar - bn); input ignore_last_bar = yes; def ignorelast = if (ignore_last_bar and bn == lastbar) then 0 else 1; def HighPoint = ignorelast and high > highest(high[1], length - 1) and high == GetValue(highest(high, length), -offset); def Lowpoint = ignorelast and low < Lowest(low[1], length - 1) and low == GetValue(Lowest(low, length), -offset); input show_Arrows_on_Highpoints_Lowpoints = yes; def vert = 0.001; def prange = highPoint – lowPoint; def plotHighest = highpoint + prange * .3; def plotLowest = lowpoint - prange * 3.0; plot BuyCriteria = if LowPoint then Low else double.NaN ; plot SellCriteria = if HighPoint then High else double.NaN ; BuyCriteria.SetPaintingStrategy(PaintingStrategy.ARROW_UP) ; BuyCriteria.SetDefaultColor(color.WHITE); BuyCriteria.SetLineWeight(5); SellCriteria.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN) ; SellCriteria.SetDefaultColor(color.WHITE); SellCriteria.SetLineWeight(5);
Tops \ Bottoms
Code:# Tops \ Bottoms # Mobius modified # Modified C.Ricks 12/22/22 input Percent_A_to_C = .1; input nP = 13; def AC = Percent_A_to_C / 100; def h = high; def l = low; def bar = BarNumber(); def Ps = 1 + AC; def Ns = 1 - AC; def hh = fold j = 1 to nP + 1 with q = 1 while q do h > GetValue(h, -j); def PivotH = if (bar > nP and h == Highest(h, nP) and hh) then h else Double.NaN; def PH1 = if !isNaN(PivotH) then h else PH1[1]; def PH2 = if PH1 != PH1[1] then PH1[1] else PH2[1]; def CheckH1 = if between(PH2, PH1 * Ns, PH1 * Ps) then 1 else 0; plot PivotHDot = PivotH; PivotHDot.SetDefaultColor(Color.WHITE); PivotHDot.SetPaintingStrategy(PaintingStrategy.POINTS);
Double Bottom
Code:# Double Bottom def ll = fold jl = 1 to nP + 1 with ql = 1 while ql do l < GetValue(low, -jl); def PivotL = if (bar > nP and l == Lowest(l, nP) and ll) then l else Double.NaN; def PL1 = if !isNaN(PivotL) then l else PL1[1]; def PL2 = if PL1 != PL1[1] then PL1[1] else PL2[1]; def Check1 = if between(PL2, PL1 * Ns, PL1 * Ps) then 1 else 0; plot PivotLDot = PivotL; PivotLDot.SetDefaultColor(Color.White); PivotLDot.SetPaintingStrategy(PaintingStrategy.POINTS); # End Code
AsGoodAsItGets Indicator without Arrows
Code:# 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+.05, "Short", Color.white, yes); plot signalrevBot = !isNaN(EIL); AddChartBubble(Signalrevbot, low-.08, "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);
AsGoodTrendColorCandles_MTFs
Code:AsGoodTrendColorCandles_MTFs ###This ASGoodTrendColorCandles_MTFs Indicator looks back 6 periods on each time frame divided by .5 painting the candle trend Green or Red. I use this as continued verification for my AsGoodAsItGets Long/Short Buy/Sell Indicator since it might repaint and I'm looking for further trend verification. ###Inspiration for this from the TTM_Trend Indicator which is a free indicator on TOS but doesn't provide code. ###Charles Ricks v.1 10/31/22 This indicator automatically address most time frames. input AGP0 = AggregationPeriod.Min; input AGP = AggregationPeriod.Five_Min; input AGP1 = AggregationPeriod.Fifteen_Min; input AGP2 = AggregationPeriod.Thirty_Min; input AGP3 = AggregationPeriod.Hour; input AGP4H = AggregationPeriod.FOUR_Hours; input AGP4 = AggregationPeriod.DAY; input AGP5 = AggregationPeriod.Week; input AGP6 = AggregationPeriod.Month; input TrendPeriods = 6; def OP = open(period = AGP); def HI = high(period = AGP); def LOW = low(period = AGP); def Close = close(period = AGP); def HighestHigh = highest(HI, trendPeriods); def LowestLow = lowest(LOW, trendPeriods); def CandleTrend = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP0 = open(period = AGP0); def HI0 = high(period = AGP0); def LOW0 = low(period = AGP0); def Close0 = close(period = AGP0); def HighestHigh0 = highest(HI, trendPeriods); def LowestLow0 = lowest(LOW, trendPeriods); def trend0 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP1 = open(period = AGP1); def HI1 = high(period = AGP1); def LOW1 = low(period = AGP1); def Close1 = close(period = AGP1); def HighestHigh1 = highest(HI, trendPeriods); def LowestLow1 = lowest(LOW, trendPeriods); def trend1 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP2 = open(period = AGP2); def HI2 = high(period = AGP2); def LOW2 = low(period = AGP2); def Close2 = close(period = AGP2); def HighestHigh2 = highest(HI, trendPeriods); def LowestLow2 = lowest(LOW, trendPeriods); def trend2 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP3 = open(period = AGP3); def HI3 = high(period = AGP3); def LOW3 = low(period = AGP3); def Close3 = close(period = AGP3); def HighestHigh3 = highest(HI, trendPeriods); def LowestLow3 = lowest(LOW, trendPeriods); def trend3 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP4 = open(period = AGP4); def HI4 = high(period = AGP4); def LOW4 = low(period = AGP4); def Close4 = close(period = AGP4); def HighestHigh4 = highest(HI, trendPeriods); def LowestLow4 = lowest(LOW, trendPeriods); def trend4 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP4H = open(period = AGP4H); def HI4H = high(period = AGP4H); def LOW4H = low(period = AGP4H); def Close4H = close(period = AGP4H); def HighestHigh4H = highest(HI, trendPeriods); def LowestLow4H = lowest(LOW, trendPeriods); def trend4H = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP5 = open(period = AGP5); def HI5 = high(period = AGP5); def LOW5 = low(period = AGP5); def Close5 = close(period = AGP5); def HighestHigh5 = highest(HI, trendPeriods); def LowestLow5 = lowest(LOW, trendPeriods); def trend5 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP6 = open(period = AGP6); def HI6 = high(period = AGP6); def LOW6 = low(period = AGP6); def Close6 = close(period = AGP6); def HighestHigh6 = highest(HI, trendPeriods); def LowestLow6 = lowest(LOW, trendPeriods); def trend6 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red);
It looks like you have combined multiple indicators without ## separations? Here is the combined codes (and they do show on the 1 min):I placed this on a 1 min chart and nothing is showing up. Can you show a screenshot of what it should look like please?
AsGood_HighLowPointPivot_Arrows
Code:##AsGood_HighLowPointPivot_Arrows def bn = BarNumber(); def na = double.nan; input length = 7; def lastBar = HighestAll(if IsNaN(close) then 0 else bn); def offset = Min(length - 1, lastBar - bn); input ignore_last_bar = yes; def ignorelast = if (ignore_last_bar and bn == lastbar) then 0 else 1; def HighPoint = ignorelast and high > highest(high[1], length - 1) and high == GetValue(highest(high, length), -offset); def Lowpoint = ignorelast and low < Lowest(low[1], length - 1) and low == GetValue(Lowest(low, length), -offset); input show_Arrows_on_Highpoints_Lowpoints = yes; def vert = 0.001; def prange = highPoint – lowPoint; def plotHighest = highpoint + prange * .3; def plotLowest = lowpoint - prange * 3.0; plot BuyCriteria = if LowPoint then Low else double.NaN ; plot SellCriteria = if HighPoint then High else double.NaN ; BuyCriteria.SetPaintingStrategy(PaintingStrategy.ARROW_UP) ; BuyCriteria.SetDefaultColor(color.WHITE); BuyCriteria.SetLineWeight(5); SellCriteria.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN) ; SellCriteria.SetDefaultColor(color.WHITE); SellCriteria.SetLineWeight(5);
Tops \ Bottoms
Code:# Tops \ Bottoms # Mobius modified # Modified C.Ricks 12/22/22 input Percent_A_to_C = .1; input nP = 13; def AC = Percent_A_to_C / 100; def h = high; def l = low; def bar = BarNumber(); def Ps = 1 + AC; def Ns = 1 - AC; def hh = fold j = 1 to nP + 1 with q = 1 while q do h > GetValue(h, -j); def PivotH = if (bar > nP and h == Highest(h, nP) and hh) then h else Double.NaN; def PH1 = if !isNaN(PivotH) then h else PH1[1]; def PH2 = if PH1 != PH1[1] then PH1[1] else PH2[1]; def CheckH1 = if between(PH2, PH1 * Ns, PH1 * Ps) then 1 else 0; plot PivotHDot = PivotH; PivotHDot.SetDefaultColor(Color.WHITE); PivotHDot.SetPaintingStrategy(PaintingStrategy.POINTS);
Double Bottom
Code:# Double Bottom def ll = fold jl = 1 to nP + 1 with ql = 1 while ql do l < GetValue(low, -jl); def PivotL = if (bar > nP and l == Lowest(l, nP) and ll) then l else Double.NaN; def PL1 = if !isNaN(PivotL) then l else PL1[1]; def PL2 = if PL1 != PL1[1] then PL1[1] else PL2[1]; def Check1 = if between(PL2, PL1 * Ns, PL1 * Ps) then 1 else 0; plot PivotLDot = PivotL; PivotLDot.SetDefaultColor(Color.White); PivotLDot.SetPaintingStrategy(PaintingStrategy.POINTS); # End Code
AsGoodAsItGets Indicator without Arrows
Code:# 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+.05, "Short", Color.white, yes); plot signalrevBot = !isNaN(EIL); AddChartBubble(Signalrevbot, low-.08, "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);
AsGoodTrendColorCandles_MTFs
Code:AsGoodTrendColorCandles_MTFs ###This ASGoodTrendColorCandles_MTFs Indicator looks back 6 periods on each time frame divided by .5 painting the candle trend Green or Red. I use this as continued verification for my AsGoodAsItGets Long/Short Buy/Sell Indicator since it might repaint and I'm looking for further trend verification. ###Inspiration for this from the TTM_Trend Indicator which is a free indicator on TOS but doesn't provide code. ###Charles Ricks v.1 10/31/22 This indicator automatically address most time frames. input AGP0 = AggregationPeriod.Min; input AGP = AggregationPeriod.Five_Min; input AGP1 = AggregationPeriod.Fifteen_Min; input AGP2 = AggregationPeriod.Thirty_Min; input AGP3 = AggregationPeriod.Hour; input AGP4H = AggregationPeriod.FOUR_Hours; input AGP4 = AggregationPeriod.DAY; input AGP5 = AggregationPeriod.Week; input AGP6 = AggregationPeriod.Month; input TrendPeriods = 6; def OP = open(period = AGP); def HI = high(period = AGP); def LOW = low(period = AGP); def Close = close(period = AGP); def HighestHigh = highest(HI, trendPeriods); def LowestLow = lowest(LOW, trendPeriods); def CandleTrend = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP0 = open(period = AGP0); def HI0 = high(period = AGP0); def LOW0 = low(period = AGP0); def Close0 = close(period = AGP0); def HighestHigh0 = highest(HI, trendPeriods); def LowestLow0 = lowest(LOW, trendPeriods); def trend0 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP1 = open(period = AGP1); def HI1 = high(period = AGP1); def LOW1 = low(period = AGP1); def Close1 = close(period = AGP1); def HighestHigh1 = highest(HI, trendPeriods); def LowestLow1 = lowest(LOW, trendPeriods); def trend1 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP2 = open(period = AGP2); def HI2 = high(period = AGP2); def LOW2 = low(period = AGP2); def Close2 = close(period = AGP2); def HighestHigh2 = highest(HI, trendPeriods); def LowestLow2 = lowest(LOW, trendPeriods); def trend2 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP3 = open(period = AGP3); def HI3 = high(period = AGP3); def LOW3 = low(period = AGP3); def Close3 = close(period = AGP3); def HighestHigh3 = highest(HI, trendPeriods); def LowestLow3 = lowest(LOW, trendPeriods); def trend3 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP4 = open(period = AGP4); def HI4 = high(period = AGP4); def LOW4 = low(period = AGP4); def Close4 = close(period = AGP4); def HighestHigh4 = highest(HI, trendPeriods); def LowestLow4 = lowest(LOW, trendPeriods); def trend4 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP4H = open(period = AGP4H); def HI4H = high(period = AGP4H); def LOW4H = low(period = AGP4H); def Close4H = close(period = AGP4H); def HighestHigh4H = highest(HI, trendPeriods); def LowestLow4H = lowest(LOW, trendPeriods); def trend4H = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP5 = open(period = AGP5); def HI5 = high(period = AGP5); def LOW5 = low(period = AGP5); def Close5 = close(period = AGP5); def HighestHigh5 = highest(HI, trendPeriods); def LowestLow5 = lowest(LOW, trendPeriods); def trend5 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red); def OP6 = open(period = AGP6); def HI6 = high(period = AGP6); def LOW6 = low(period = AGP6); def Close6 = close(period = AGP6); def HighestHigh6 = highest(HI, trendPeriods); def LowestLow6 = lowest(LOW, trendPeriods); def trend6 = if ((Close - LowestLow) / (HighestHigh - LowestLow)) > .5 then 1 else 0; AssignPriceColor(if CandleTrend then color.green else color.red);
@csricksdds[/USER], is there a delay on Top/Bottoms Indicator? Does it appear after so many bars? The other two indicators appear to be in real time. ThanksI use a 1 minute and 5 minute charts for day trading. Open your "Added studies and strategies" (beaker on chart view to left of time drop down and wheel then beaker. Click on beaker. Your studies will drop down. Click on wheel to right of study and change np to 9 on Top/Bottoms Indicator.
Same process on TurningPointArrows and set length to 15.
You can set these parameters how you wish...these are the settings I use.
Sorry but neither the older upper and the newer lower, both come up red and don't work. I've been installing code on tos for many years and I can't see anything I'm doing wrong. What say?Several of you have used my AsGoodAsItGets indicator. This is a new version for the lower. It uses a Squared.Histogram to show Short/Long Entries. I use it above the Modified Laguerre_Momentum posted a few minutes ago (Remember this repaints)!
Here is the code:
# AsGoodAsItGets Lower Indicator
#CSR Buy/Sell Arrows with Short/Long Bubbles
#Developed 4-23-23 First Edition 8-23-22 Revised
declare lower;
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);
signaldown.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
plot signalrevBot = !isNaN(EIL);
Signalrevbot.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
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);
Go to your indicator dropdown beaker - right click on the wheel at the end of the indicator - and color your plots - signaldown, numerical, draw as block and color red. Then signalrevBot, numerical, draw as block and color Green. If problems let me know?Sorry but neither the older upper and the newer lower, both come up red and don't work. I've been installing code on tos for many years and I can't see anything I'm doing wrong. What say?
Or try this code and see if it works:Go to your indicator dropdown beaker - right click on the wheel at the end of the indicator - and color your plots - signaldown, numerical, draw as block and color red. Then signalrevBot, numerical, draw as block and color Green. If problems let me know?
Just WOW, the recommended lower version worked, and it does look As Good As it Gets. Thank you. I will try to make the upper work now.Or try this code and see if it works:
# AsGoodAsItGets Lower Indicator
#CSR Buy/Sell Arrows with Short/Long Bubbles
#Developed 4-23-23 First Edition 8-23-22 Revised
declare lower;
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);
signaldown.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
signaldown.DefineColor("signaldown", Color.Red);
plot signalrevBot = !isNaN(EIL);
Signalrevbot.SetPaintingStrategy(PaintingStrategy.SQUARED_HISTOGRAM);
signalrevBot.DefineColor("signalrevBot", Color.GREEN);
input usealerts = yes;
alert(usealerts and signaldown[1] == 1, "Short", alert.bar, sound.ding);
alert(usealerts and signalrevbot[1] == 1, "Long", alert.bar, sound.ding);
Start a new thread and receive assistance from our community.
useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.
We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.
If you are new, or just looking for guidance, here are some helpful links to get you started.