Repaints Trend Reversal for ThinkorSwim

Repaints
Status
Not open for further replies.
@pga0008
3m is my go to and I'm doing fine with it. Patience is definitely a key. The scanner I use is the TMO less than -10 on a 5m and then look for entry on a 3m.
 

Volatility Trading Range

VTR is a momentum indicator that shows if a stock is overbought or oversold based on its Weekly and Monthly average volatility trading range.

Download the indicator

@tenacity11 can you point me to that scanner. I appreciate the fast response and help too!
this is the scanner I use for the TMO along with price between 25-75 and beta of 1.5-2.5 and 20 period moving average of volume> 3000000
on the D...whatever price etc you want to use is up to you along with the TMO
Hope this helps

Code:
declare Lower;

input length = 14;
input calcLength = 5;
input smoothLength = 3;

def o = open;
def c = close;
def data = fold i = 0 to length
           with s
           do s + (if c > getValue(o, i)
                   then 1
                   else if c < getValue(o, i)
                        then - 1
                        else 0);
def EMA5 = ExpAverage(data, calcLength);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
     Main.AssignValueColor(if Main > Signal
                           then color.green
                           else color.red);
     Signal.AssignValueColor(if Main > Signal
                             then color.green
                             else color.red);
     Signal.HideBubble();
     Signal.HideTitle();
plot zero = if isNaN(c) then double.nan else 0;
     zero.SetDefaultColor(Color.gray);
     zero.hideBubble();
     zero.hideTitle();
plot ob = if isNaN(c) then double.nan else round(length * .7);
     ob.SetDefaultColor(Color.gray);
     ob.HideBubble();
     ob.HideTitle();
plot os = if isNaN(c) then double.nan else -round(length * .7);
     os.SetDefaultColor(Color.gray);
     os.HideBubble();
     os.HideTitle();
# End Code TMO
 
Basically that's it. I like to see a nice down move with all the parameters.
Sounds good to me. If you don't mind me asking, how's your success been when using both of these indicators? I'm going to read through the TMO thread right now to see if I can combine it like the way you do. By any chance, do you ever use the RSIL with the TMO? On the first couple of pages of the TMO thread, many people use it with the RSIL.
 
Sounds good to me. If you don't mind me asking, how's your success been when using both of these indicators? I'm going to read through the TMO thread right now to see if I can combine it like the way you do. By any chance, do you ever use the RSIL with the TMO? On the first couple of pages of the TMO thread, many people use it with the RSIL.
I've tried many combinations but to be honest simplicity has always worked best for me and just the TMO along with the swing high low candles and the trend reversal has proven itself. I think you should definitely look at different things and find what you feel works best for you.
 
I've tried many combinations but to be honest simplicity has always worked best for me and just the TMO along with the swing high low candles and the trend reversal has proven itself. I think you should definitely look at different things and find what you feel works best for you.
Awesome. After I'm done with the Trend Reversal backtesting, I'll be sure to try out more combinations. Thanks for the reply.
 
Awesome. After I'm done with the Trend Reversal backtesting, I'll be sure to try out more combinations. Thanks for the reply.
You're very welcome and have a good weekend. Keep me updated on your results. I also do occasionally look at Wolf waves on the chart also.
this was another nice one today.

GPFYO1k.png
 
Sorry I don't trade a 10m so not sure who or what you're referring to but if you checkout the 3m C chart I got a great signal and trade with the method I use. what is the Hahahaha?
I thought that BenTen said that we should NOT use the Trendreversal indicator because it repaints. Am I mistaken?
 
@Pensar would you please help convert this #TrendReversal Scanner into a similar format as you did for the #MomentumKeltnerChannels_Scanner so that the arrow alerts within maximum 2 candles from the criteria being met? Thank you

This is what you added to the MomentumKeltnerChannels Scanner:

def n1 = Hold[0] == 1;
def n2 = Hold[0] == -1;
def countup = if n1 and !n1[1] then 1 else countup[1]+1;
def countdn = if n2 and !n2[1] then 1 else countdn[1]+1;

plot BuyAm = if n1 then if(countup < 2, 1, 0) else 0;
#plot SellAm = if n2 then if(countdn < 3, 1, 0) else 0;

Here is the Trend Reversal Scanner:

Code:
# 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;
input lookback = 1;

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 = Highest(bullish2, lookback);


def bearish2 = signal < 0 and signal[1] >= 0;
plot downArrow = Highest(bearish2, lookback);
 
@tenacity11 You have three plots indicated in this code, what was ORIGINAL plot that produced this chart you continue to share,....the 10Minute of Citi.....now if you don't want to say,...fine....but I am trying to reproduce your results without success. I have created the scan without success.

My share: http://tos.mx/1hc0xME
 
You have three plots indicated in this code, what was ORIGINAL plot that produced this chart you continue to share,....the 10Minute of Citi.....now if you don't want to say,...fine....but I am trying to reproduce your results without success. I have created the scan without success.
Thomas I have no problem saying or sharing information. I guess I'm not understanding what else it is that you want
 
@Bendu Here's your code: http://tos.mx/HR8oO6Z

@tenacity11 OK, we will begin to address the question you haven't answered,.....you shared a code with three plots,.....it cannot declare true with all, so what was edited to have the scan work.....I may be wrong here but I cannot add this code, it asks for "ONE PLOT??"

Here's my scan,....look in the custom code of your shared TMO....... http://tos.mx/IzCGnjR
 
Status
Not open for further replies.

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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