True Momentum Oscillator for ThinkorSwim

F

FlashTrader

New member
This indicator looks promising. I'm going to give it a try. Thanks
 
markos

markos

Well-known member
VIP
Does anyone have the scanner script for this TMO?
@stocksniper try this out. Read carefully as there are two bear and two bull scans included and you have to comment out (#) the right lines.
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];
 
markos

markos

Well-known member
VIP
This indicator looks promising. I'm going to give it a try. Thanks
@FlashTrader there are quite a few threads in useThinkScript to go through for the TMO. Please use the search bar and learn from the posts of those that came before... markos Trade small and live to trade another day.
 
subharmonic

subharmonic

New member
@subharmonic I like your color coded watchlist! Thank you for sharing.

However, (often) when I review each equity in my charts ... the TMO Indicator(s) don't show the same values and/or colors. Is there some change in the calculation/values of TMO in your custom watchlist? I am using the standard Mobius TMO with Aggregation Periods.

Thanks
Can you give me an example? I notice on the turning points there are some issues, in heavy trends where it is stuck in the OB/OS areas. Please make sure to give examples on daily or higher so I can look at what you are seeing after market close.
 
H

HighBredCloud

Active member
VIP
I am going to try to convert this for ticks, I will update if I figure that out.
Ticks as in tick charts? Because it works on tick charts already as long as you're using the standard non MTF version.
 
zeek

zeek

Active member
2019 Donor
@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);
Wondering if it`s possible to add another condition to these buy/sell signals and the condition is the RSI value. For example, only trigger sell signal if RSI is above 70.
Can this be added to the code above somehow?
 
S

stockfella

New member
@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);
Newer here, where would I insert this part of the code if already using TMO?
 
zeek

zeek

Active member
2019 Donor
Wondering if it`s possible to add another condition to these buy/sell signals and the condition is the RSI value. For example, only trigger sell signal if RSI is above 70.
Can this be added to the code above somehow?
Can anyone help me with this request? Need to filter out the signals even more by only trigger buy if RSI is below 30 and vice versa, sell signal only if RSI is above 70.
 
S

stockfella

New member
@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);
I suck at code and have the TMO on my chart, but having trouble finding the original script code for TMO to add the extra code for buy and sell signal from @DeusMecanicus
 
U

URA

New member
VIP
hello Guru's

How to create a scanner for this script when weekly_TMO and day_ TMO in green and crossing for buy signal. Any help would be great.
 
H

HighBredCloud

Active member
VIP
Can anyone help me with this request? Need to filter out the signals even more by only trigger buy if RSI is below 30 and vice versa, sell signal only if RSI is above 70.
The only issue that I see with that request is that there are plenty of stocks that are exploding past the 70 RSI on the DAILY chart...you getting a sell signal might put you upside down on your position....same with below 30...I have seen stocks touch 10 RSI or less...just saying.
 
zeek

zeek

Active member
2019 Donor
The only issue that I see with that request is that there are plenty of stocks that are exploding past the 70 RSI on the DAILY chart...you getting a sell signal might put you upside down on your position....same with below 30...I have seen stocks touch 10 RSI or less...just saying.
I use TMO on intraday timeframes only so it’s not a problem and can always change the values too.
 
H

HighBredCloud

Active member
VIP
I use TMO on intraday timeframes only so it’s not a problem and can always change the values too.
Yeah me too...The highest timeframe I use is 1h and I see stocks every day dipping OVER the 70-90 RSI range while still going up...
 
B

BWiz

New member
Can anyone help me with this request? Need to filter out the signals even more by only trigger buy if RSI is below 30 and vice versa, sell signal only if RSI is above 70.
Here you go.

def BUYsignal =Main < OS and Main crosses above Signal and Main < os;
def SELLsignal = Main > OB and Main crosses below Signal and Main > ob;
addverticalline(BUYsignal,"Buy",color.green,curve.firm);
addverticalline(SELLsignal,"Sell",color.red,curve.firm);
 
S

stockfella

New member
B

BWiz

New member
@stockfella Read through here. I think you will find what you are looking for.

 
Last edited by a moderator:

Top