bhaskar_madugula
Member
..I understand Trend Reversal Indicator repaint on lower timeframes but does it repaint on 30 min, Hourly and Daily Chart?
Check out our Buy the Dip indicator and see how it can help you find profitable swing trading ideas. Scanner, watchlist columns, and add-ons are included.
Try this one out I think you will like it. It does have sound and is pretty accurate in many time frames. I have tried this out with /MES (market direction) SPXL (symbol for market long or up) QQQ ( tech) TQQQ (long tech) also some AAPL. (not stock advice) Best for a person not under the PDT rule but can also grow a small account. I hope this helps you. (I DID NOT MAKE THIS INDICATOR) I spend many days and nights searching this site for good strategies for someone that has a 6yo in online school LOL!@BenTen what does it mean when the trend reversal is purple, and is there a sound alert that can be set with this tool
# Trend Reversal Scanner
# Scanner by [URL]https://usethinkscript.com/u/theelderwand[/URL]
# Discuss [URL]https://usethinkscript.com/d/183-trend-reversal-indicator-with-signals-for-thinkorswim[/URL]
def price = close;
def superfast_length = 9;
def fast_length = 14;
def slow_length = 21;
def displace = 0;
def mov_avg9 = ExpAverage(price[-displace], superfast_length);
def mov_avg14 = ExpAverage(price[-displace], fast_length);
def mov_avg21 = ExpAverage(price[-displace], slow_length);
#moving averages
def Superfast = mov_avg9;
def Fast = mov_avg14;
def Slow = mov_avg21;
def buy = mov_avg9 > mov_avg14 and mov_avg14 > mov_avg21 and low > mov_avg9;
def stopbuy = mov_avg9 <= mov_avg14;
def buynow = !buy[1] and buy;
def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1] == 1 and stopbuy then 0 else buysignal[1], 0);
def Buy_Signal = buysignal[1] == 0 and buysignal == 1;
def Momentum_Down = buysignal[1] == 1 and buysignal == 0;
def sell = mov_avg9 < mov_avg14 and mov_avg14 < mov_avg21 and high < mov_avg9;
def stopsell = mov_avg9 >= mov_avg14;
def sellnow = !sell[1] and sell;
def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1] == 1 and stopsell then 0 else sellsignal[1], 0);
def Sell_Signal = sellsignal[1] == 0 and sellsignal;
input method = {default average, high_low};
def bubbleoffset = .0005;
def percentamount = .01;
def revAmount = .05;
def atrreversal = 2.0;
def atrlength = 5;
def pricehigh = high;
def pricelow = low;
def averagelength = 5;
def averagetype = AverageType.EXPONENTIAL;
def mah = MovingAverage(averagetype, pricehigh, averagelength);
def mal = MovingAverage(averagetype, pricelow, averagelength);
def priceh = if method == method.high_low then pricehigh else mah;
def pricel = if method == method.high_low then pricelow else mal;
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
rec EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == priceh then priceh else pricel) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then pricel else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then priceh else GetValue(EIH, 1);
def dir = CompoundValue(1, if EIL != EIL[1] or pricel == EIL[1] and pricel == EISave then 1 else if EIH != EIH[1] or priceh == EIH[1] and priceh == EISave then -1 else dir[1], 0);
def signal = CompoundValue(1, if dir > 0 and pricel > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and priceh < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1], 0);
def bullish2 = signal > 0 and signal[1] <= 0;
plot upArrow = bullish2;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
upArrow.SetDefaultColor(CreateColor(145, 210, 144));
def bearish2 = signal < 0 and signal[1] >= 0;
plot downArrow = bearish2;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
downArrow.SetDefaultColor(CreateColor(255, 15, 10));
#Alerts
input alerts = yes;
def bull = if signal > 0 and signal[1] <= 0 then 1 else 0;
def bear = if signal < 0 and signal[1] >= 0 then 1 else 0;
Alert(alerts and bullish2[1] == 1, "Up ", Alert.BAR, Sound.Chimes);
Alert(alerts and bearish2[1] == 1, "Down ", Alert.BAR, Sound.Bell);
Try this one out I think you will like it. It does have sound and is pretty accurate in many time frames. I have tried this out with /MES (market direction) SPXL (symbol for market long or up) QQQ ( tech) TQQQ (long tech) also some AAPL. (not stock advice) Best for a person not under the PDT rule but can also grow a small account. I hope this helps you. (I DID NOT MAKE THIS INDICATOR) I spend many days and nights searching this site for good strategies for someone that has a 6yo in online school LOL!
# Trend Reversal Scanner
# Scanner by https://usethinkscript.com/u/theelderwand
# Discuss https://usethinkscript.com/d/183-trend-reversal-indicator-with-signals-for-thinkorswim
def price = close;
def superfast_length = 9;
def fast_length = 14;
def slow_length = 21;
def displace = 0;
def mov_avg9 = ExpAverage(price[-displace], superfast_length);
def mov_avg14 = ExpAverage(price[-displace], fast_length);
def mov_avg21 = ExpAverage(price[-displace], slow_length);
#moving averages
def Superfast = mov_avg9;
def Fast = mov_avg14;
def Slow = mov_avg21;
def buy = mov_avg9 > mov_avg14 and mov_avg14 > mov_avg21 and low > mov_avg9;
def stopbuy = mov_avg9 <= mov_avg14;
def buynow = !buy[1] and buy;
def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1] == 1 and stopbuy then 0 else buysignal[1], 0);
def Buy_Signal = buysignal[1] == 0 and buysignal == 1;
def Momentum_Down = buysignal[1] == 1 and buysignal == 0;
def sell = mov_avg9 < mov_avg14 and mov_avg14 < mov_avg21 and high < mov_avg9;
def stopsell = mov_avg9 >= mov_avg14;
def sellnow = !sell[1] and sell;
def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1] == 1 and stopsell then 0 else sellsignal[1], 0);
def Sell_Signal = sellsignal[1] == 0 and sellsignal;
input method = {default average, high_low};
def bubbleoffset = .0005;
def percentamount = .01;
def revAmount = .05;
def atrreversal = 2.0;
def atrlength = 5;
def pricehigh = high;
def pricelow = low;
def averagelength = 5;
def averagetype = AverageType.EXPONENTIAL;
def mah = MovingAverage(averagetype, pricehigh, averagelength);
def mal = MovingAverage(averagetype, pricelow, averagelength);
def priceh = if method == method.high_low then pricehigh else mah;
def pricel = if method == method.high_low then pricelow else mal;
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
rec EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == priceh then priceh else pricel) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then pricel else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then priceh else GetValue(EIH, 1);
def dir = CompoundValue(1, if EIL != EIL[1] or pricel == EIL[1] and pricel == EISave then 1 else if EIH != EIH[1] or priceh == EIH[1] and priceh == EISave then -1 else dir[1], 0);
def signal = CompoundValue(1, if dir > 0 and pricel > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and priceh < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1], 0);
def bullish2 = signal > 0 and signal[1] <= 0;
plot upArrow = bullish2;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
upArrow.SetDefaultColor(CreateColor(145, 210, 144));
def bearish2 = signal < 0 and signal[1] >= 0;
plot downArrow = bearish2;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
downArrow.SetDefaultColor(CreateColor(255, 15, 10));
#Alerts
input alerts = yes;
def bull = if signal > 0 and signal[1] <= 0 then 1 else 0;
def bear = if signal < 0 and signal[1] >= 0 then 1 else 0;
Alert(alerts and bullish2[1] == 1, "Up ", Alert.BAR, Sound.Chimes);
Alert(alerts and bearish2[1] == 1, "Down ", Alert.BAR, Sound.Bell);
Thanks MerryDay,@Picard to use the script in post# 1385 in the TOS scanner
Copy the code
In Studies, click Create
Paste the above study
Name the study: Trend_Reversal_Scanner
Save
Click on the scanner.
I didn't write this script. Any questions should be referred to the original poster. HTH
- Click on +Add filter
- Click on the pencil icon next to the filter you just added
- Click edit
- In the left column, click on the 1st pull-down window, click study
- Type in Trend_Reversal_Scanner
- Under Plot, click on the pull-down window, choose upArrow
- In the middle column, choose is true
- Save
Sorry about that. I didn't see that post before. However, it's also common and frustrating that many who answer my questions only pick one of the questions in my post and ignore the rest of my post. Was there also an answer in this forum for the second part of my post that I may have missed?@Picard For future reference, it is poor forum etiquette to continuing to ask the same question after it has been answered.
As already stated indicators cannot send email or text notifications.
You can have scans send text and email alerts but there are delays. For more information refer to this tutorial:
https://usethinkscript.com/threads/how-to-receive-thinkorswim-alert-notifications-via-phone.5430/
Also I tried using "Create Alert" from a chart and inserting the code, but now I'm back to the error "Exactly one plot expected". Apparently in the code plotting an arrow is not what TOS considers a plot that would correct this error. It must need some other plot. How can I correct this error?
I found a video on YouTube.Sorry about that. I didn't see that post before. However, it's also common and frustrating that many who answer my questions only pick one of the questions in my post and ignore the rest of my post. Was there also an answer in this forum for the second part of my post that I may have missed?
# Trend Reversal Scanner
# Scanner by https://usethinkscript.com/u/theelderwand
# Discuss https://usethinkscript.com/d/183-trend-reversal-indicator-with-signals-for-thinkorswim
def price = close;
def superfast_length = 9;
def fast_length = 14;
def slow_length = 21;
def displace = 0;
def mov_avg9 = ExpAverage(price[-displace], superfast_length);
def mov_avg14 = ExpAverage(price[-displace], fast_length);
def mov_avg21 = ExpAverage(price[-displace], slow_length);
#moving averages
def Superfast = mov_avg9;
def Fast = mov_avg14;
def Slow = mov_avg21;
def buy = mov_avg9 > mov_avg14 and mov_avg14 > mov_avg21 and low > mov_avg9;
def stopbuy = mov_avg9 <= mov_avg14;
def buynow = !buy[1] and buy;
def buysignal = CompoundValue(1, if buynow and !stopbuy then 1 else if buysignal[1] == 1 and stopbuy then 0 else buysignal[1], 0);
def Buy_Signal = buysignal[1] == 0 and buysignal == 1;
def Momentum_Down = buysignal[1] == 1 and buysignal == 0;
def sell = mov_avg9 < mov_avg14 and mov_avg14 < mov_avg21 and high < mov_avg9;
def stopsell = mov_avg9 >= mov_avg14;
def sellnow = !sell[1] and sell;
def sellsignal = CompoundValue(1, if sellnow and !stopsell then 1 else if sellsignal[1] == 1 and stopsell then 0 else sellsignal[1], 0);
def Sell_Signal = sellsignal[1] == 0 and sellsignal;
input method = {default average, high_low};
def bubbleoffset = .0005;
def percentamount = .01;
def revAmount = .05;
def atrreversal = 2.0;
def atrlength = 5;
def pricehigh = high;
def pricelow = low;
def averagelength = 5;
def averagetype = AverageType.EXPONENTIAL;
def mah = MovingAverage(averagetype, pricehigh, averagelength);
def mal = MovingAverage(averagetype, pricelow, averagelength);
def priceh = if method == method.high_low then pricehigh else mah;
def pricel = if method == method.high_low then pricelow else mal;
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
rec EISave = if !IsNaN(EI) then EI else GetValue(EISave, 1);
def chg = (if EISave == priceh then priceh else pricel) - GetValue(EISave, 1);
def isUp = chg >= 0;
def EIL = if !IsNaN(EI) and !isUp then pricel else GetValue(EIL, 1);
def EIH = if !IsNaN(EI) and isUp then priceh else GetValue(EIH, 1);
def dir = CompoundValue(1, if EIL != EIL[1] or pricel == EIL[1] and pricel == EISave then 1 else if EIH != EIH[1] or priceh == EIH[1] and priceh == EISave then -1 else dir[1], 0);
def signal = CompoundValue(1, if dir > 0 and pricel > EIL then if signal[1] <= 0 then 1 else signal[1] else if dir < 0 and priceh < EIH then if signal[1] >= 0 then -1 else signal[1] else signal[1], 0);
def bullish = signal > 0 and signal[1] <= 0;
plot upArrow = bullish;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
#upArrow.SetDefaultColor(CreateColor(145, 210, 144));
upArrow.AssignValueColor(Color.Light_Green);
#AddLabel(yes, "Buy", Color.Lime);
def bearish = signal < 0 and signal[1] >= 0;
plot downArrow = bearish;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
#downArrow.SetDefaultColor(CreateColor(255, 15, 10));
downArrow.AssignValueColor(Color.Pink);
#AddLabel(yes, "Sell", Color.Pink);
# AddLabel(yes, if Bullish then ("Buy", Color.Lime) else Bearish ("Sell" , Color.Pink);
# =========================================
# Buy/Sell Signal
# =========================================
plot BuyAlert = bullish;
plot SellAlert = bearish;
BuyAlert.AssignValueColor(if BuyAlert then Color.Green else if SellAlert then Color.Red else Color.White);
AssignBackgroundColor(if BuyAlert then Color.Green else if SellAlert then Color.Red else Color.White);
Alert(BuyAlert, "Buy", Alert.BAR, Sound.Ring);
AddOrder(OrderType.BUY_AUTO, BuyAlert, tickColor = Color.Dark_Green, arrowColor = Color.Dark_Green, name = "Buy");
AddOrder(OrderType.SELL_AUTO, SellAlert, tickColor = Color.Dark_Red, arrowColor = Color.Dark_Red, name = "Sell");
AddLabel(yes,
if BuyAlert then Concat("BUY@ ", AsText(hl2, NumberFormat.Dollar)) else if SellAlert then Concat("SELL@ ", AsText(hl2, NumberFormat.Dollar)) else "", if BuyAlert then Color.Dark_Green else if SellAlert then Color.Dark_Red else Color.White);
Yes, I understand what you are saying. I've done this before and made complicated indicator into a custom watchlist quote column by using the Wizard. http://tos.mx/VNXwnbK However, in this case there's something else that isn't quite working well and I keep going over it again and again to figure it out.@Picard
You have been asked to do your own searches for answers before posting.
If you don't know how to search a thread for an answer. Here are the directions.
Meanwhile, here is the answer to your question.
HTH
http://tos.mx/VNXwnbK --imported this successfully but does not show up any where...can you helpYes, I understand what you are saying. I've done this before and made complicated indicator into a custom watchlist quote column by using the Wizard. http://tos.mx/VNXwnbK However, in this case there's something else that isn't quite working well and I keep going over it again and again to figure it out.
Thank you!To Find A Shared Watchlist Column
- Click on MarketWatch at the top of the TOS app
- Click on the gear icon to the far right of all the columns in the table
- Type in the Name of the Indicator you imported
@royalrock HTH
Get access to Ben's watchlist, swing trading strategy, ThinkorSwim setup, and trade examples.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Repaints Enhanced Trend Reversal Indicator for ThinkorSwim | Indicators | 122 | ||
Reversal Candles (Saikou / Hikui) Trend Change for ThinkorSwim | Indicators | 10 | ||
LNL Trend System for ThinkOrSwim | Indicators | 25 | ||
L3 Banker Fund Flow Trend Oscillator for ThinkOrSwim | Indicators | 33 | ||
Trend Meter For ThinkOrSwim | Indicators | 38 |
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.