Archived: TMO True Momentum Oscillator

Status
Not open for further replies.

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

Here is a colored vertical line for buy and sell signals on TMO main and signal cross.

Code:
def BUYsignal = Main crosses above Signal;
def SELLsignal = Main crosses below Signal;
addverticalline(BUYsignal,"Buy",color.green,curve.firm);
addverticalline(SELLsignal,"Sell",color.red,curve.firm);
 
@tenacity11 You can input the same formula Mark provided in the default ToS scanner and it should work. Just select Main crosses above or below Signal and within how many bars.
 
@Mark1126 Just a slight modification to cut down on the number of signals and filter out some low R/R trades.

Code:
def BUYsignal =Main < OS and Main crosses above Signal;
def SELLsignal = Main > OB and Main crosses below Signal;
addverticalline(BUYsignal,"Buy",color.green,curve.firm);
addverticalline(SELLsignal,"Sell",color.red,curve.firm);
 
@zeek Try this:

Code:
# Alerts
Alert(BuySignal, " ", Alert.Bar, Sound.Chimes);
Alert(SellSignal, " ", Alert.Bar, Sound.Bell);
 
TrueMomentumOscillator_14()."Main" crosses above TrueMomentumOscillator_14()."Signal"

See if that is what you want
You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.

I have the TMO scanner that you have that tomsk made...also I tried to implement other TMO scanner into it...just not sure if I commented out the right things and if I put them int the appropriate scan parts of Bullish or Bearish...

I guess for anyone that is interested assuming what I did was right...Someone that knows what they are doing please confirm.


Code:
# TMO ((T)rue (M)omentum (O)scilator) Scan
# Mobius, with modifications by tomsk, 1.1.2020
# 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.

input length = 14;
input calcLength = 5;
input smoothLength = 3;
#input level = -10;   ##Bullish Scan
#input level = 10;   ##Bearish Scan

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

#hint: Comment out using # below to scan for Bullish or Bearish.  Please note that ## applies to conditional scan with parameters -10 (over sold condition) Bullish Scan) and 10 (over bought condition) Bearish Scan) Default is set to a Bullish TMO Scan without any conditions.

##***Bullish Scan***

##plot scan = main < level and signal < level and main > signal;
#plot scan = main < main[1] and signal < signal[1];

##***Bearish Scan***

##plot scan = main > level and signal > level and main < signal;
plot scan = main > main[1] and signal > signal[1];
 
You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.

I have the TMO scanner that you have that tomsk made...also I tried to implement other TMO scanner into it...just not sure if I commented out the right things and if I put them int the appropriate scan parts of Bullish or Bearish...

I guess for anyone that is interested assuming what I did was right...Someone that knows what they are doing please confirm.


Code:
# TMO ((T)rue (M)omentum (O)scilator) Scan
# Mobius, with modifications by tomsk, 1.1.2020
# 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.

input length = 14;
input calcLength = 5;
input smoothLength = 3;
#input level = -10;   ##Bullish Scan
#input level = 10;   ##Bearish Scan

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

#hint: Comment out using # below to scan for Bullish or Bearish.  Please note that ## applies to conditional scan with parameters -10 (over sold condition) Bullish Scan) and 10 (over bought condition) Bearish Scan) Default is set to a Bullish TMO Scan without any conditions.

##***Bullish Scan***

##plot scan = main < level and signal < level and main > signal;
#plot scan = main < main[1] and signal < signal[1];

##***Bearish Scan***

##plot scan = main > level and signal > level and main < signal;
plot scan = main > main[1] and signal > signal[1];

TrueMomentumOscillator_14()."Main" crosses above TrueMomentumOscillator_14()."Signal"
this is directly from the ThinkScript editor
 
Curious to know if there are other momentum oscillators that uses delta instead of price to calculate momentum? I really like this one but it's always nice to compare with others.

Anyone know?
 
@zeek Mobius created this about 2 years ago in the lounge. Gent named Nube created a few spinoffs as I recall. They would be in the Universe of thinkscript in the reference section.
 
You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.

I have the TMO scanner that you have that tomsk made...also I tried to implement other TMO scanner into it...just not sure if I commented out the right things and if I put them int the appropriate scan parts of Bullish or Bearish...

I guess for anyone that is interested assuming what I did was right...Someone that knows what they are doing please confirm.


Code:
# TMO ((T)rue (M)omentum (O)scilator) Scan
# Mobius, with modifications by tomsk, 1.1.2020
# 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.

input length = 14;
input calcLength = 5;
input smoothLength = 3;
#input level = -10;   ##Bullish Scan
#input level = 10;   ##Bearish Scan

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

#hint: Comment out using # below to scan for Bullish or Bearish.  Please note that ## applies to conditional scan with parameters -10 (over sold condition) Bullish Scan) and 10 (over bought condition) Bearish Scan) Default is set to a Bullish TMO Scan without any conditions.

##***Bullish Scan***

##plot scan = main < level and signal < level and main > signal;
#plot scan = main < main[1] and signal < signal[1];

##***Bearish Scan***

##plot scan = main > level and signal > level and main < signal;
plot scan = main > main[1] and signal > signal[1];
@HighBredCloud Good day, any way that you could assist me with getting setup with scan, with some brief instructions on setting up, like where and how thanks. .
 
@HighBredCloud Good day, any way that you could assist me with getting setup with scan, with some brief instructions on setting up, like where and how thanks. .

Paste this code into into the think script editor...This can be found in the scan section of TOS. You will need to "Add Filter" from the upper right...Select STUDY...Select Custom...then make sure you're pasting into Think Script Editor and NOT Condition Wizard. I hope this helps.
 
Hey man thanks for taking the time to reply much appreciated ! Be safe!
Your welcome...I would just verify the code if I got the Bullish and Bearish correct from post #127...I think I had them reversed in the post in this thread because opposite results would come out at times. Nobody verified tho so its hard for me to say...Perhaps @BenTen could take a look and verify so that you don't your scan search doesn't pull out the wrong results.
 
Your welcome...I would just verify the code if I got the Bullish and Bearish correct from post #127...I think I had them reversed in the post in this thread because opposite results would come out at times. Nobody verified tho so its hard for me to say...Perhaps @BenTen could take a look and verify so that you don't your scan search doesn't pull out the wrong results.
Do you know the steps that I can take to set this up in a custom column, that's what I'm trying to add, I don't need the scanner I'm looking for the visual column. Thanks.
 
Here is my version. I have some similar ones with different indicators that act like histogram colors too.


3AIGgWP.png


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.

declare Lower;

input length = 21;
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 Signal = ExpAverage(Main, smoothLength);
assignBackgroundColor(if Main > Signal
                           then color.dark_green
                           else color.Dark_red);


def ob = if isNaN(c) then double.nan else round(length * .7);

def os = if isNaN(c) then double.nan else -round(length * .7);

plot IntheGreen = (Signal < os);
AddLabel(IntheGreen, "OS", Color.White);
plot IntheRed = (Signal > ob);
AddLabel(IntheRed, "OB", Color.White);
plot IntheMIddle = (Signal < ob and Signal > OS);
AddLabel(IntheMIddle, "--", Color.black);
@subharmonic Would it be ok to share your custom Column for the TMO, I'm trying to set one up thanks.
 
Status
Not open for further replies.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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