Trend_R_Signal Indicator for ThinkorSwim

jerrydinvestor

New member
2019 Donor
The indicator was made my Mobius. This indicator can predict bullish and bearish trend by plotting lines between 0.2 to -0.2 graph. If the line is at 0.2(Positive) than its trending if it's at -0.2(negative) then its bearish.

Originally it was made as a lower study. I modified it and made it upper study with arrows when bullish and bearish patterns appear. This will save some space on the workspace for other indicators.

I have done some backtesting and it generated some decent amount on profits on Timeframes above 3 Minutes.

Cons: Does not work well in Choppy Markets.

q4sJl2o.png


thinkScript Code

Code:
# R Signal Trend Sign

#Mobius

#If R signal is above 0 trend is up and below 0 trend is down.

#V01.06.01.2019

#Modified: Jerry 6/27/2019

input n = 10;
def size = 100;

def c = close;

def r = Sqrt(Sqr(Log(c / c[n])) + Sqr(Log(n))) /

        Sum(Sqrt(1 + Sqr(Log(c / c[1]))), n - 1);

def signal = if Log(c / c[n]) > 0 then ExpAverage(r, n) else ExpAverage(-r, n);

AddLabel(yes, signal, Color.WHITE);
def buy = 0;
def sell = 0;
def strategy = if signal > 0 then buy else if signal < 0 then sell else 0;

plot buyOpen = signal[1] crosses above 0;
buyOpen.AssignValueColor(Color.GREEN);
buyOpen.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
def buyClose = signal crosses below 0;

plot shortOpen = signal[1] crosses below 0;
shortOpen.AssignValueColor(Color.RED);
shortOpen.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
def shortClose = signal crosses above 0;

Shareable Link

Upper Study: https://tos.mx/dfQoeALower Study: https://tos.mx/WipD1U
 

Attachments

  • q4sJl2o.png
    q4sJl2o.png
    321.3 KB · Views: 205
Last edited by a moderator:
Thank you, Jerry. One request; Where you put #Modified in your script (thanks) please put a breif explanation of your mods so that if the script gets "into the wild" it can be dialed back to Mobius' original form. This is a newer request from the folks in TSL.
 

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
291 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