Repaints Trend Reversal for ThinkorSwim

Repaints
Status
Not open for further replies.
Gabriel, loving your testing results post. Any good updates you come up with yet?
Hi, Tem. After I back tested the TR indicator for the month of July; I went on to back test AMD using this indicator for the month of March. The volatility wasn't as great, so my ROI wasn't so appealing. I was still successful with my trades, but I was making like $30-$40 profit with $10,000 trades.

I recently came back into trading small caps and I am currently trading with an indicator called the Trend Painter. It has been working really well, today I made 13% trading the stock CGIX. I sold too early because it's continuing to run. Here's the link to the exact study I use: http://tos.mx/Ypc8FBj.

Here's the link to the thread I got it from. It was brought to my attention by a user named Bon Bon. https://usethinkscript.com/threads/...or-with-buy-sell-signals-for-thinkorswim.226/. Hope this helps.
 

New Indicator: Buy the Dip

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.

Download the indicator

Hi, Tem. After I back tested the TR indicator for the month of July; I went on to back test AMD using this indicator for the month of March. The volatility wasn't as great, so my ROI wasn't so appealing. I was still successful with my trades, but I was making like $30-$40 profit with $10,000 trades.

I recently came back into trading small caps and I am currently trading with an indicator called the Trend Painter. It has been working really well, today I made 13% trading the stock CGIX. I sold too early because it's continuing to run. Here's the link to the exact study I use: http://tos.mx/Ypc8FBj.

Here's the link to the thread I got it from. It was brought to my attention by a user named Bon Bon. https://usethinkscript.com/threads/...or-with-buy-sell-signals-for-thinkorswim.226/. Hope this helps.
wow great results, what time frame do use to trade small caps? Do you scan for top gainers pre market?
 
For those of you that have used this indicator for a while, how would you compare the average setting vs the high low setting? Which setting would you say gives more reliable trend reversal signals? Which setting would you say gives earlier signal? Why use one vs the other?

Thanks for your input!
 
For those of you that have used this indicator for a while, how would you compare the average setting vs the high low setting? Which setting would you say gives more reliable trend reversal signals? Which setting would you say gives earlier signal? Why use one vs the other?

Thanks for your input!
high-low gives an earlier signal
 
@Trading51 - Adjusted bull/bear bubbles to be placed at value of reversal bar. Added Stop Loss bubble and extended line

Code:
# Trend Reversal
# Dixon72 with modifications by tomsk
# 1.18.2020
# Scanner by https://usethinkscript.com/u/theelderwand

# V1.0 - 11.09.2019 - Dixon72 - Initial release of Trend Reversal Scanner
# V1.1 - 01.18.2020 - tomsk   - Modified to only display last bullish/bearish signal
# V1.2 - 01.18.2020 - tomsk   - Added user input selector displayBubblesOnly to display bubbles rather than arrows
# V1.3 - 01.19.2020 - BLT     - Modified bubble placement, added Stop Loss bubble and extended line

input displayBubblesOnly = yes;

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 = if signal > 0 and signal[1] <= 0 then barNumber() else 0;
plot upArrow = if !displayBubblesOnly and barNumber() == HighestAll(bullish2) then low * 0.994 else Double.NaN;
upArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
upArrow.SetLineWeight(5);
upArrow.SetDefaultColor(Color.CYAN);

def bearish2 = if signal < 0 and signal[1] >= 0 then barNumber() else 0;
plot downArrow = if !displayBubblesOnly and barNumber() == HighestAll(bearish2) then high * 1.004 else Double.NaN;
downArrow.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
downArrow.SetLineWeight(5);
downArrow.SetDefaultColor(Color.YELLOW);

AddChartBubble(displayBubblesOnly and barNumber() == HighestAll(bullish2), low, "Bull " + astext(low), Color.Cyan, no);
AddChartBubble(displayBubblesOnly and barNumber() == HighestAll(bearish2), high, "Bear " + astext(high), Color.Yellow, yes);
def bullstop= if barNumber() == HighestAll(bullish2) then low[1] else if barnumber() < HighestAll(bullish2) then double.nan else bullstop[1];
plot bullstopplot = bullstop;
bullstopplot.setdefaultColor(color.red);
AddChartBubble(displayBubblesOnly and barNumber() == HighestAll(bullish2), low[1], "Stop " + astext(low[1]), Color.red, no);
def bearstop= if barNumber() == HighestAll(bearish2) then high[1] else if barnumber() < HighestAll(bearish2) then double.nan else bearstop[1];
plot bearstopplot = bearstop;
bearstopplot.setdefaultColor(color.red);
AddChartBubble(displayBubblesOnly and barNumber() == HighestAll(bearish2), high[1], "Stop " + astext(high[1]), Color.red, yes);
# End Trend Reversal
Can anyone help with adding code to this version of the Trend Reversal Indicator so that the candlesticks are painted Red when the Trend Reversal signal is Bearish and Dark_Green when the Trend Reversal signal is Bullish? Thanks in advance for any assistance!
 
Ben - I tried to load the scanner on TOS, but I got a message saying that this was a complex script and could take longer to load. HOWEVER, it wouldn't let me "OK" the script. Any suggestions? Thank you.
 
Ben - I took a look at that posting and tried to load that script, but faced the same situation. Any other thoughts? Are you able to run this scan? Don't know what else to do. Thanks!
 
@BobHug You shouldn't have the same issue. Please take a screenshot and share it here. I would like to see the condition you added to your scanner.
 
Status
Not open for further replies.

BenTen's Watchlist + Setup + Trade Recaps

Get access to Ben's watchlist, swing trading strategy, ThinkorSwim setup, and trade examples.

Learn more

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
294 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