Repaints Trend Reversal for ThinkorSwim

Repaints
Status
Not open for further replies.

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 pass on the reversal study that contains the up arrows next to the cyan colored candles? For the life of me I loaded 4-5 of the same study but none of them contain the arrows (which is why my scanner is not working). Have the reversal bubble, bubble with price alone, driving me nuts.

Secondly, can you scan for the cyan colored bar?

Thanks!
 
I was able to find the one with the arrows but the study is too complicated to run it on the scanner. Would be nice if there is a way to make it work?
 
@tenacity11 , can you pass on the reversal study that contains the up arrows next to the cyan colored candles? For the life of me I loaded 4-5 of the same study but none of them contain the arrows (which is why my scanner is not working). Have the reversal bubble, bubble with price alone, driving me nuts.

Secondly, can you scan for the cyan colored bar?

Thanks!

Code:
#Trend Reverse Indicator

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;

#Alert(condition = buysignal[1] == 0 and buysignal == 1, text = "Buy Signal", sound = Sound.Bell, "alert type" = Alert.BAR);

def Momentum_Down = buysignal[1] == 1 and buysignal == 0;

#Alert(condition = buysignal[1] == 1 and buysignal == 0, text = "Momentum_Down", sound = Sound.Bell, "alert type" = Alert.BAR);

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;
 
Last edited by a moderator:
I was able to find the one with the arrows but the study is too complicated to run it on the scanner. Would be nice if there is a way to make it work?

# Swing Low Scan
# tomsk
# 12.1.2019

input length = 10;

def bn = BarNumber();
def lastBar = HighestAll(if IsNaN(close) then 0 else bn);
def offset = Min(length - 1, lastBar - bn);
def swingLow = low < Lowest(low[1], length - 1) and low == GetValue(Lowest(low, length), -offset);
def lowPointOneBarNumber = HighestAll(if swingLow then bn else 0);
plot scan = bn == lowPointOneBarNumber;
# End Swing Low Scan
 
I have been testing the Trend Reversal Indicator by BenTen and wondered if there was a way to set an alert in TOS that tells me the trend has reversed.
 
BenTen, (or anyone), This indicator,Trend Reversal Indicator with Signals for ThinkorSwim, is interesting with its reversal bubbles and I've been studying it for while to trying and understand the code and how it works. There is a lot of discussion on the form about the moving averages. But I don't see in the code that the three moving averages are involved at all with creating the trigger signals that create and set the location of the reversal bubbles. Right now my opinion is that they do nothing.
Try this coding experiment.
-- Load the study and get the reversal bubbles to appear.
-- Edit the code and comment out the following two lines of code by using the # symbol.

---------------- def Buy_Signal = buysignal[1] == 0 and buysignal == 1;
-- change to #def Buy_Signal = buysignal[1] == 0 and buysignal == 1;

--------------- def def Sell_Signal = sellsignal[1] == 0 and sellsignal;
-- change to #def Sell_Signal = sellsignal[1] == 0 and sellsignal;

As far as I can see these are the final lines of code that use all of the previous code involving the moving averages and that are the buy and sell signals from the moving averages.

My thinking is this:
1. If the buy and sell signals from these moving averages are being used anywhere in the rest of the code to create the reversal bubbles then commenting them out will create coding error messages, but I do not get coding error messages after commenting out these two lines of code.
2. If the moving average buy/sell signals are used to determine the location of the reversal bubbles then something will change on the chart, but nothing on the chart changes that I can see after commenting out these two lines of code.

I didn't know where to post these thoughts so I've answered your last post that I see.

If My thinking about the MA's is way off please correct me.
 
Last edited:
@Stockbug You are not the only person who notices that, good catch. We talked about this in the past. The script seems to be incomplete. So the moving averages don't do anything at all.
 
@Stockbug You are not the only person who notices that, good catch. We talked about this in the past. The script seems to be incomplete. So the moving averages don't do anything at all.
Not only are the MA's not used, the bubble locations do not match the MA logic.

# Code says: If the 3 MA's are "stacked" UP and the bar low is above all three,
# then create a BUY signal. But on the chart reversal bubbles appear that defy this logic.
def buy = mov_avg9 > mov_avg14 and mov_avg14 > mov_avg21 and low > mov_avg9;
 
Hi, I wanted to know, is there a way to not have the chart bubbles and instead just have arrows indicating up or down in place of the bubbles?
 
@TCP Page #1, under the section called Scanner, load up that version of the study.
 
Is that possible to create these signals with colors in watchlist column in different time frame for day trading? otherwise, I need to look for every single chart right now which is time consuming to me. Can you write the script for watchlist?
Thanks.
 
I've seen different answers on if this can be used as a scanner. Some say yes, some say no. Can someone please clarify? Thank you!
 
@BenTen Thank you! Makes a bit more sense now. I have now got to the point where I need to edit the condition and this is where I am stuck. Can you give me an example of what I would enter for up arrow and down arrow? I have provided a screenshot. Thanks for all your help and all you do with this site!

TVtQEEw.png
 
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
487 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