Reverse Relative Strength using Donchian Channels For ThinkOrSwim

Status
Not open for further replies.

hockeycoachdoug

Active member
2019 Donor
VIP

I recently watched a new webinar from TOP Trade Tools about their new AMP advisory service. The basic gist is they are using a scanner looking for a strategy signal. In this case they are using their proprietary HFT Hedge Fund Trender Strategy to first get all the buy or sell signals, then they are filtering the scan symbols to see if they are in an area of high energy meaning plenty of juice in the tank. I want to try to identify their TOP Swing Energy indicator. When the signal occurs in a high swing energy area it is more likely a better, more powerful signal. Here is an example See chart here

I want to identify what the filter signal is similar to in the open code market. I assumed it was a function of ADX probably, but I asked on the webinar and he was vague but said it had "cyclic factors" so I am clueless. Any help is appreciated.

Here is another slide from the webinar showing a winning and losing trade See chart here
Unfortunately, he doesn't show the filter on the same chart, just says it was high or low energy when the signal occured. The logic seems sound, and a filtering indicator like this would be useful for any trading system that gives buy/sell signals. Any and all help is appreciated. You can sign up to watch the webinar Here
They run the webinar numerous times.
 
Last edited by a moderator:
Solution
@hockeycoachdoug Sure, I don't mind sharing. Of course, I couldn't resist making it look nice first -

sample-pic.png

Code:
input donchianlength = 10;
input averagelength = 3;
input averagetype = averagetype.SIMPLE;

def hh = highest(high,donchianlength);
def ll = lowest(low,donchianlength);
plot RS = movingaverage(averagetype,100*(hh-close)/(hh-ll),averagelength);
     RS.setpaintingstrategy(paintingstrategy.histogram);
     RS.assignvaluecolor(if rs > 75 then color.uptick else if rs > 25 then color.yellow else color.downtick);
     RS.setlineweight(3);

plot high_strength = 75;
     high_strength.setdefaultcolor(color.gray);
     high_strength.setpaintingstrategy(paintingstrategy.horizontal)...
@hockeycoachdoug My two cents' worth, take it with a grain of salt as it is only based on what I read about Top Trade Tools, their website, and your provided description and pictures. I haven't bought this indicator or any other from them - this is my best guess only.
I believe that it might be a "reverse relative strength" indicator using their version of donchian channels. Given that their buy points are usually near the low donchian channel in a uptrend, the indicator probably plots in reverse, i.e., when price is within 25% of the donchian low it turns bright green, and within 25% of the donchian high it turns red.

my-conjecture.png
 
@Pensar. Can I ask what that idea might look like from a TOS code perspective. I like your chart shown. I assume the lower indicator represents the price in relation to the Doncian Channel. Is that correct? If yes, would you be willing to share what you have so far. Thanks in advance.
 
@hockeycoachdoug Sure, I don't mind sharing. Of course, I couldn't resist making it look nice first -

sample-pic.png

Code:
input donchianlength = 10;
input averagelength = 3;
input averagetype = averagetype.SIMPLE;

def hh = highest(high,donchianlength);
def ll = lowest(low,donchianlength);
plot RS = movingaverage(averagetype,100*(hh-close)/(hh-ll),averagelength);
     RS.setpaintingstrategy(paintingstrategy.histogram);
     RS.assignvaluecolor(if rs > 75 then color.uptick else if rs > 25 then color.yellow else color.downtick);
     RS.setlineweight(3);

plot high_strength = 75;
     high_strength.setdefaultcolor(color.gray);
     high_strength.setpaintingstrategy(paintingstrategy.horizontal);
     high_strength.setstyle(curve.short_dash);
plot low_strength = 25;
     low_strength.setdefaultcolor(color.gray);
     low_strength.setpaintingstrategy(paintingstrategy.horizontal);
     low_strength.setstyle(curve.short_dash);
 
Last edited by a moderator:
Solution
@Pensar- I think this is pretty close, but I have a couple more questions/requests if I may. I watched another playing of the webinar and caught this slide that shows the setting he is using for the Swing Energy indicator. You can See chart here
The settings show ("b", 10, 50, 75, Green, Yellow, Red). He said there are 2 versions of this indicator- a "Buy" and a "Sell" version. I'm sure that is what the "b" is in the setting. I think the 10 is the Doncian channel length, and 50, 75 are the plotting limits to change colors.

According to the author, You should have a high fully charged value, meaning high green bars for a fully charged buy. This would require running only the "buy" version. You would also have a high fully charged value, meaning high green bars for a fully charged sell also. Is this something you can help me with? Thanks in advance.
 
@Pensar- I think this is pretty close, but I have a couple more questions/requests if I may. I watched another playing of the webinar and caught this slide that shows the setting he is using for the Swing Energy indicator. You can See chart here
The settings show ("b", 10, 50, 75, Green, Yellow, Red). He said there are 2 versions of this indicator- a "Buy" and a "Sell" version. I'm sure that is what the "b" is in the setting. I think the 10 is the Doncian channel length, and 50, 75 are the plotting limits to change colors.

According to the author, You should have a high fully charged value, meaning high green bars for a fully charged buy. This would require running only the "buy" version. You would also have a high fully charged value, meaning high green bars for a fully charged sell also. Is this something you can help me with? Thanks in advance.

@hockeycoachdoug Now that's a great clue. Of course, this code will not be an exact match, given that they very likely use a modified version of the donchian channel.
Code:
declare lower;

input direction = {default "buy", "sell"};
input short_donchian = 10;
input long_donchian = 50;
input high_value = 75;
input low_value = 25;
input averagelength = 2;
input averagetype = averagetype.SIMPLE;

def hh = highest(high,long_donchian);
def ll = lowest(low,short_donchian);
def strength;
switch (direction) {
case sell: strength = movingaverage(averagetype,100*(close-ll)/(hh-ll),averagelength);
default: strength = movingaverage(averagetype,100*(hh-close)/(hh-ll),averagelength); }

plot RS = strength;
     RS.setpaintingstrategy(paintingstrategy.histogram);
     RS.assignvaluecolor(if rs > 75 then color.uptick else if rs > 25 then color.yellow else color.downtick);
     RS.setlineweight(3);

plot high_strength = high_value;
     high_strength.setdefaultcolor(color.gray);
     high_strength.setpaintingstrategy(paintingstrategy.horizontal);
     high_strength.setstyle(curve.short_dash);
plot low_strength = low_value;
     low_strength.setdefaultcolor(color.gray);
     low_strength.setpaintingstrategy(paintingstrategy.horizontal);
     low_strength.setstyle(curve.short_dash);
I think this is the the closest I can reverse-engineer it without actually seeing the other indicator's code. In all honesty, though, if their little code differences are the only key to profitable v.s. unprofitable, there's bigger problems to worry about. A quote I read once, "Those who can trade do and those who can't trade sell indicators", or something like that. Really makes one think about another saying, "there's a market for everything".

Eye-Candy of both directions -
buy-sell-versions.png


Merry Christmas to you!
 
Status
Not open for further replies.

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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