TMO True Momentum Oscillator For ThinkOrSwim

I would like to have a scanner that shows stocks that are crossing below the overbought line and crossing above the oversold line.
 
Is there a method to change the code of the TMO, so that the view becomes larger on the screen, or even superimpose it over the price chart? The size of the TMO graph seems to vary with the price level of the issue, e.g., the view is much smaller for a $500 stock, and much larger for a $50 stock.
 
Is there a method to change the code of the TMO, so that the view becomes larger on the screen, or even superimpose it over the price chart?
Here are the various scripts superimposing TMO data on the upper chart:
https://usethinkscript.com/threads/...llator-for-thinkorswim.9413/page-2#post-85843
https://usethinkscript.com/threads/...lator-for-thinkorswim.9413/page-5#post-117854
https://usethinkscript.com/threads/...lator-for-thinkorswim.9413/page-6#post-131913
https://usethinkscript.com/threads/...lator-for-thinkorswim.9413/page-6#post-131935

The size of the TMO graph seems to vary with the price level of the issue, e.g., the view is much smaller for a $500 stock, and much larger for a $50 stock.
Please provide annotate images displaying the "size of the TMO graph vary with the price level of the issue"
phenomenon so contributors can understand and offer a solution.
 
Is there a method to change the code of the TMO, so that the view becomes larger on the screen, or even superimpose it over the price chart? The size of the TMO graph seems to vary with the price level of the issue, e.g., the view is much smaller for a $500 stock, and much larger for a $50 stock.
I was thinking about this just the other day. If I could just have the signal on the price chart.
 
For those interested I include how I am using TMO combined with 2 RSI indicators on a normalized scale for swing trading on day charts. Below is a graphic and below that the code. TMO in yellow. The RSI's in Cyan and Magenta.
View attachment 12893
Code:
# TMO ((T)rue (M)omentum (O)scilator)
# Mobius
# V01.05.2018
# hint: TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.
#@rlohmeyer: RSI,TMO on normalized scale
declare lower;
#Scale Normaliztion Script
script normalizePlot {
    input normalize_data = close;
    input MinRng = -1;
    input MaxRng = 1;
    def HH = HighestAll( normalize_data );
    def LL = LowestAll( normalize_data );
    plot NR = ((( MaxRng - MinRng ) * ( normalize_data - LL )) / ( HH - LL )) + MinRng;
}

#TMO
input Tmo_Price = close;
input Tmo_data_length = 5;
input Tmo_Ema_Length = 5;
def o = open;
def TMOdata = fold i = 0 to TMO_data_length with s do s + (if TMO_price > getValue(o, i) then 1 else if TMO_price < getValue(o, i)    then - 1 else 0);
def TMOavg = ExpAverage(TMOdata, TMO_EMA_Length);
#RSI
input RSI_price = close;
def RSI_Average = AverageType.WILDERS;
input RSI_Avg_Length = 2;
def NetChgAvg = MovingAverage(RSI_Average, RSI_price - RSI_price[1], RSI_Avg_Length);
def TotChgAvg = MovingAverage(RSI_Average, AbsValue(RSI_price - RSI_price[1]), RSI_Avg_Length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RS = 50 * (ChgRatio + 1);
input Rsi_Ema_Length = 2;
def RSIavg =  ExpAverage(RS, RSI_EMA_Length);
#RSI2
input RsiTwoPrice = close;
def RsiTwoAverage = AverageType.WILDERS;
input RsiTwoAvgLength = 2;
def NetChgAvg2 = MovingAverage(RsiTwoAverage, RsiTwoPrice - RsiTwoPrice[1], RsiTwoAvgLength);
def TotChgAvg2 = MovingAverage(RsiTwoAverage, AbsValue(RsiTwoPrice - RsiTwoPrice[1]), RsiTwoAvgLength);
def ChgRatio2 = if TotChgAvg2 != 0 then NetChgAvg2 / TotChgAvg2 else 0;
def RS2 = 50 * (ChgRatio2 + 1);
input RsiTwoEmaLength = 2;
def RSIavg2 =  ExpAverage(RS2, RsiTwoEmaLength);

#Scale parameters
input MaxRng = 100;#Max range value
input MinRng = 0;#Min range value
input OBH = 95;
input OBL = 90;
Addcloud(OBH,OBL,color.green);
input OSH = 10;
input OSL = 5;
Addcloud(OSH,OSL,color.red);

#Scale normalization based on parameters
def newTMO = normalizePlot(TMOavg, MinRng, MaxRng );
def newRSI = normalizePlot(RSIavg, MinRng, MaxRng );
def newRSI2 = normalizePlot(RSIavg2, MinRng, MaxRng );
#Plots
plot TMO = newTMO;
TMO.setdefaultColor(color.yellow);
TMO.Hidebubble();
TMO.hidetitle();

plot RSI = newRSI;
RSI.setdefaultColor(color.cyan);
RSI.hidebubble();
RSI.hidetitle();

plot RSI2 = newRSI2;
RSI2.setdefaultColor(color.magenta);
RSI2.hidebubble();
RSI2.hidetitle();

plot Mid = (MaxRng + MinRng)/2;
Mid.setdefaultColor(color.light_gray);
Mid.hidebubble();
Mid.hidetitle();
I see on your chart that you have monthly horizontal volume shelves with a cyan colored monthly vwap. Could you please share this script?
 
Is there a way to code this so the line on the chart and not the indicator?
Maybe try this one man.

Code:
#hint: TMO calculates momentum using the DELTA of price. Giving a much better picture of trend, trend reversals and divergence than momentum oscillators using price.

declare upper;

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);
def Main = ExpAverage(EMA5, smoothLength);


def zero = if IsNaN(c) then Double.NaN else 0;
     #zero.SetDefaultColor(Color.gray);
     #zero.hideBubble();
     #zero.hideTitle();
def ob = if IsNaN(c) then Double.NaN else Round(length * .7);

def os = if IsNaN(c) then Double.NaN else -Round(length * .7);


input TMOLabels = yes;

# End Code TMO Short Term
#################################################################
#TMO2

input length2 = 42;
input calcLength2 = 15;
input smoothLength2 = 9;

def o2 = open;
def c2 = close;
def data2 = fold i2 = 02 to length2
           with s2
           do s2 + (if c2 > GetValue(o2, i2)
                   then 1
                   else if c2 < GetValue(o2, i2)
                        then - 1
                        else 0);
def EMA52 = ExpAverage(data2, calcLength2);
def Main2 = ExpAverage(EMA52, smoothLength2);
def Signal2 = ExpAverage(Main2, smoothLength2);

def Diff = Main2 - Signal2;



#################################################################
def TMOup = Main > Main[1] and Diff > Diff[1];
def TMOdn = Main < Main[1] and Diff < Diff[1];
def TMOnet = !TMOup and !TMOdn;

input plotis = 0.00;
def TMO1 = plotis;

AddLabel(TMOLabels and TMOup, " TMO combo Bullish ", Color.GREEN);
AddLabel(TMOLabels and TMOdn, " TMO combo Bearish ", Color.RED);
AddLabel(TMOLabels and TMOnet, " TMO combo Neutral ", Color.YELLOW);

def TMOupB = TMOup and !TMOup[1];
def TMOdnB = TMOdn and !TMOdn[1];

input n = 0;
def n1  = n + 1;

def stochbuy = Main crosses above signal2 and os;
def stochsell = Main crosses below signal2 and ob;
###########

AddVerticalLine( if main crosses above os  and tmoup then high else Double.NaN, "Get Ready To Buy", Color.LIGHT_GREEN, Curve.FIRM);

AddVerticalLine( if main crosses below ob and tmodn then high else Double.NaN, "Get Ready To Short", Color.LIGHT_ORANGE, Curve.FIRM);
 
Last edited by a moderator:

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