• Get $40 off VIP by signing up for a free account! Sign Up

Overlapping lower studies RSI, Williams%, and OBV


Active member
Hello all,

This is my first post here, just started lurking last week and decided that I would love to try out an indicator that HuffMac90 recommended in an old thread, but I'm stuck on how to add this into a TOS lower chart:

Basis is utilizing a RSI (8, 70, 30 (green zone)) with a 20 & 80 (yellow zone) and 10 & 90 (red zone), then a Williams%r set to (8, -20,-70), and an On Balance Volume (OBV).

In his example, he showed this lower chart:


I just started using Thinkscript a few weeks ago for very basic customization of columns in my scanners, modifying scanners, etc. but have not been able to figure out how to write code for a custom lower chart in TOS that would replicate the above. Can someone help with figuring out how to create an equivalent to this chart in the above screenshot?
Last edited:
Looks like a bunch of lower studies being stacked together into one section. This would create scaling issues. I don't recommend it.

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

Thanks for your reply. I also had read that it would be necessary, when combining lower studies into one section, to find one zoom level or scale that seems to work reliably and then not change that, because of the scaling problem.

I read that using relative threshold triggers (like if the values' relationships to each other from the different studies are within a certain percentage, give different weighted scores that can add up to a total of 1 to confirm a crossover) could be a solution, but I'm not looking to do something that complicated. I was intending to combine this with other indicators because I understand using it by itself would give unreliable results.

PS: I found a YouTube video that answered my question about how to combine the indicators into one section:

Could someone please help me to combine these 3 indicators(FW,MACD,REVERSE RSI) into one script? I'm trying to see if I can get the indicators lines stay put instead of moving up/down as when we scroll back and forth. Thanks


declare lower;

input price = CLOSE;
input colorNormLength = 3;
input dpoLength = 14;
input moboDisplace = 0;
input moboLength = 10;
input numDevDn = -0.8;
input numDevUp = 0.8;
input coloredMobo = Yes;
input coloredFill = Yes;
input breakArrows = Yes;
input moboShowMid = No;

plot DPO = Double.NaN;
plot MidlineP = Double.NaN;
plot UpperBandP = Double.NaN;
plot LowerBandP = Double.NaN;
plot Zeroline = Double.NaN;
plot BreakOutArrow = Double.NaN;
plot BreakDownArrow = Double.NaN;

declare lower;

input fastLength = 12;
input slowLength = 26;
input MACDLength = 9;
input averageType = AverageType.EXPONENTIAL;
input showBreakoutSignals = no;

plot Value = MovingAverage(averageType, close, fastLength) - MovingAverage(averageType, close, slowLength);
plot Avg = MovingAverage(averageType, Value, MACDLength);

plot Diff = Value - Avg;
plot ZeroLine = 0;

plot UpSignal = if Diff crosses above ZeroLine then ZeroLine else Double.NaN;
plot DownSignal = if Diff crosses below ZeroLine then ZeroLine else Double.NaN;


Diff.DefineColor("Positive and Up", Color.GREEN);
Diff.DefineColor("Positive and Down", Color.DARK_GREEN);
Diff.DefineColor("Negative and Down", Color.RED);
Diff.DefineColor("Negative and Up", Color.DARK_RED);
Diff.AssignValueColor(if Diff >= 0 then if Diff > Diff[1] then Diff.color("Positive and Up") else Diff.color("Positive and Down") else if Diff < Diff[1] then Diff.color("Negative and Down") else Diff.color("Negative and Up"));

input length = 14;
input price = close;
input rsiValue = 50.0;
input smoothingType = {default Wilders, EMA};

def coeff = rsiValue / (100 - rsiValue);
def chg = price - price[1];
def diff;
switch (smoothingType) {
case Wilders:
    diff =  (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff - WildersAverage(Max(chg, 0), length));
case EMA:
    diff =  (length - 1) * (ExpAverage(Max(-chg, 0), length) * coeff - ExpAverage(Max(chg, 0), length)) / 2;

def value = price + if diff >= 0 then diff else diff / coeff;
plot RevEngRSI = compoundValue(1, value[1], Double.NaN);

Last edited:
I wanted to know if it is at all possible to write a strategy and a scan for two different indicators that are noncongruent scales. IE; 3/10 Oscillator slow line crossing above a StochasticSlow K. Is this possible?

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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