Repaints Trend Reversal Questions

Repaints

MerryDay

Administrative
Staff member
Staff
VIP
Lifetime
Trend Reversal Indicator:
Read through this thread for answers to everything that you ever wanted to know about the Trend Reversal Indicator
https://usethinkscript.com/threads/trend-reversal-indicator-with-signals-for-thinkorswim.183/

PLEASE NOTE: THIS INDICATOR REPAINTS
Repainters are the FASTEST way to find and be alerted to tops and bottoms which make them the preferred indicators for shorter timeframes.
But because repainters are such prolific liars, these studies should ONLY be used to make entry by traders proficient in using them in correlation with price action, candlestick patterns, a disciplined stop-loss plan, and the fortitude to weather the losses that come with the false signals.
Read more:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-57833

Continue reading for answers to your most pressing questions.
 
Last edited:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Hello all,
I like this Trend Indicator that I got from the this site (but I don't know who to credit for the original). I tried to incorporate Alerts when an arrow goes off (I know that they can repaint). Can anyone fix the alerts for the Arrows Up and Arrows Down?
 
Hello all,
I like this Trend Indicator that I got from the this site (but I don't know who to credit for the original). I tried to incorporate Alerts when an arrow goes off (I know that they can repaint). Can anyone fix the alerts for the Arrows Up and Arrows Down?

Go through this thread, your question has been answered by @MerryDay

Additionally, you can enable the alerts by removing "#" in front of the Alert function.
 
Go through this thread, your question has been answered by @MerryDay

Additionally, you can enable the alerts by removing "#" in front of the Alert function.
Thanks Ben. I did remove the # sign on the alert that I thought was for the arrows, but it didn't work. I believe I have already checked out the others, but I will look again.
 
Hello all,
I like this Trend Indicator that I got from the this site (but I don't know who to credit for the original). I tried to incorporate Alerts when an arrow goes off (I know that they can repaint). Can anyone fix the alerts for the Arrows Up and Arrows Down?
The arrows are not painted in real time.
So attempting to write an alert to find them can be challenging:

If they were repainted "within" the last few bars; this snippet could perhaps find them?
Ruby:
alert(bullish2 within 3 bars, "Bull", Alert.BAR, Sound.Ring);
alert(bearish2 within 3 bars, "Bear", Alert.BAR, Sound.Ding);
add it to the bottom of your script.

These alerts will not occur in real-time therefore members do not find any value in them.
This adds "within x bars" to go back in time and find repainted signals, but as warned, you really don't want to do this. You have to wait x-bars to get the alert. Given that repainters are used by scalpers, that lag of x bars makes it unprofitable.
 
The arrows are not painted in real time.
So attempting to write an alert to find them can be challenging:

If they were repainted "within" the last few bars; this snippet could perhaps find them?
Ruby:
alert(bullish2 within 3 bars, "Bull", Alert.BAR, Sound.Ring);
alert(bearish2 within 3 bars, "Bear", Alert.BAR, Sound.Ding);
add it to the bottom of your script.

These alerts will not occur in real-time therefore members do not find any value in them.
This adds "within x bars" to go back in time and find repainted signals, but as warned, you really don't want to do this. You have to wait x-bars to get the alert. Given that repainters are used by scalpers, that lag of x bars makes it unprofitable.
@MerryDay, @BenTen - I was able to fix them in the original version by taking the # out of all alert lines. The alerts do occur in real time with the original version, correct? Thanks for all of your help!
 
@MerryDay, @BenTen - I was able to fix them in the original version by taking the # out of all alert lines. The alerts do occur in real time with the original version, correct? Thanks for all of your help!
Most members are not able to get those alerts to work.
https://usethinkscript.com/threads/trend-reversal-for-thinkorswim.183/page-20#post-10064
https://usethinkscript.com/threads/trend-reversal-for-thinkorswim.183/page-20#post-10073

But hey, if they are working for you; that's great.
Otherwise, the workaround provided above will work. But no, they will not work in real-time.
 
has this script been updated? with out repaints? just to be clear why are we providing scripts that repaint and members cannot use? this seems like a complete waist of time and leads members into the wrong direction?
also for direction purposes can someone tell me how or where to find the best indicators and strategies with say 75% to 80% success win trades over say loss trades? I'm a trend following and swing trader and work a second job so we are looking to set a trailing stop and leave?
 
has this script been updated? with out repaints?
No updates. No, you can't make repainters not repaint.

just to be clear why are we providing scripts that repaint and members cannot use? this seems like a complete waist of time and leads members into the wrong direction?
Repainters have their place.
Read more:
https://usethinkscript.com/threads/answers-to-commonly-asked-questions.6006/#post-57833

also for direction purposes can someone tell me how or where to find the best indicators and strategies with say 75% to 80% success win trades over say loss trades? I'm a trend following and swing trader and work a second job so we are looking to set a trailing stop and leave?
This post will help you with your question:
https://usethinkscript.com/threads/backtesting-a-tos-strategy.10942/#post-123766
 
@firstuser
It is beyond the scope of a ThinkOrSwim forum to provide guidance on other platforms.


Research indicates, due to the many false signals, it is not possible to create a profitable strategy based on a repainter.

The Positive: Repainters are the fastest tool for identifying and alerting to tops and bottoms, making them an essential part of the scalper's toolbox. However, repainters can not be relied upon for entry or exit signals.

Repainters serve as a visual aid to spot potential reversals, but other indicators and analysis need to be used to determine entry and exit points because repainters are such prolific liars.
Use repainters in correlation with price action, candlestick patterns, a disciplined stop-loss plan, and the fortitude to weather the losses that come with the false signals.

The Negative: Repainting is problematic especially for newer traders. Repainters provide triggers promising a stock has hit a low (or high) and is indicating NOW NOW NOW is the time to make entry, and it can be right, reinforcing their belief that this is a good strategy. But it can also be wrong, it erases the signal, continues to drop like a rock, and crushes previous profits. Just the potential of that possibility causes traders to lack confidence, to leave trades early at the smallest sign of trouble, creating a feedback loop of ever-smaller profits and ever-larger losses.

When using repainting studies:
Never use a repainter for entry in isolation!

Both up and down signals will repaint.
You will see more buy arrow repainting when the instrument has a strong bearish trend. As it makes new lows the previous up signals will be erased.
You will see more sell arrow repainting when the instrument has a bullish trend. As it makes new highs the previous down signals will be erased.
 
Last edited:
HI @MerryDay & @Pensar

I am using Pensar's version below, but I am unable to get it to show in Mobile Version of TOS.

Any assistance that can be provided?

THank you very much!

input method = {default average, high_low};
def bubbleoffset = .5;
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 priceh = if method == method.high_low then pricehigh else MovingAverage(averagetype, pricehigh, averagelength);
def pricel = if method == method.high_low then pricelow else MovingAverage(averagetype, pricelow, averagelength);
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
def reversalAmount = if (close * percentamount / 100) > Max(revAmount < atrreversal * reference ATR(atrlength), revAmount) then (close * percentamount / 100) else if revAmount < atrreversal * reference ATR(atrlength) then atrreversal * reference ATR(atrlength) else revAmount;
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;
rec isConf = AbsValue(chg) >= reversalAmount or (IsNaN(GetValue(EI, 1)) and GetValue(isConf, 1));
def EId = if isUp then 1 else 0;
plot EnhancedLines = if EId <= 1 then EI else Double.NaN;
EnhancedLines.AssignValueColor(if EId == 1 then Color.GREEN else if EId == 0 then Color.RED else Color.DARK_ORANGE);
EnhancedLines.SetStyle(Curve.FIRM);
EnhancedLines.EnableApproximation();
EnhancedLines.HideBubble();
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 showarrows = yes;
plot U1 = showarrows and signal > 0 and signal[1] <= 0;
U1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
U1.SetDefaultColor(Color.GREEN);
U1.SetLineWeight(4);
plot D1 = showarrows and signal < 0 and signal[1] >= 0;
D1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
D1.SetDefaultColor(Color.RED);
D1.SetLineWeight(4);
 
HI @MerryDay & @Pensar

I am using Pensar's version below, but I am unable to get it to show in Mobile Version of TOS.

Any assistance that can be provided?

THank you very much!

input method = {default average, high_low};
def bubbleoffset = .5;
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 priceh = if method == method.high_low then pricehigh else MovingAverage(averagetype, pricehigh, averagelength);
def pricel = if method == method.high_low then pricelow else MovingAverage(averagetype, pricelow, averagelength);
def EI = ZigZagHighLow("price h" = priceh, "price l" = pricel, "percentage reversal" = percentamount, "absolute reversal" = revAmount, "atr length" = atrlength, "atr reversal" = atrreversal);
def reversalAmount = if (close * percentamount / 100) > Max(revAmount < atrreversal * reference ATR(atrlength), revAmount) then (close * percentamount / 100) else if revAmount < atrreversal * reference ATR(atrlength) then atrreversal * reference ATR(atrlength) else revAmount;
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;
rec isConf = AbsValue(chg) >= reversalAmount or (IsNaN(GetValue(EI, 1)) and GetValue(isConf, 1));
def EId = if isUp then 1 else 0;
plot EnhancedLines = if EId <= 1 then EI else Double.NaN;
EnhancedLines.AssignValueColor(if EId == 1 then Color.GREEN else if EId == 0 then Color.RED else Color.DARK_ORANGE);
EnhancedLines.SetStyle(Curve.FIRM);
EnhancedLines.EnableApproximation();
EnhancedLines.HideBubble();
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 showarrows = yes;
plot U1 = showarrows and signal > 0 and signal[1] <= 0;
U1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
U1.SetDefaultColor(Color.GREEN);
U1.SetLineWeight(4);
plot D1 = showarrows and signal < 0 and signal[1] >= 0;
D1.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
D1.SetDefaultColor(Color.RED);
D1.SetLineWeight(4);
No, this indicator will never work on the mobile app.
read more:
https://usethinkscript.com/threads/trend-reversal-for-thinkorswim.183/page-52#post-34615
https://usethinkscript.com/threads/trend-reversal-for-thinkorswim.183/page-56#post-37772
https://usethinkscript.com/threads/trend-reversal-for-thinkorswim.183/page-74#post-68754
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
318 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

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.

How do I get started?

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.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top