True Momentum Oscillator for ThinkorSwim

H

HighBredCloud

Well-known member
VIP
This is what I use.
TrueMomentumOscillator_14()."Main" is less than -10
yeah...that's the one that I have...but its not the one that scans for the color change...The one you have is when it crosses above or below the Over Bought Over Sold condition...
 
tenacity11

tenacity11

Active member
2019 Donor
yeah...that's the one that I have...but its not the one that scans for the color change...The one you have is when it crosses above or below the Over Bought Over Sold condition...
You want the one that Main crosses above the Signal?
 
H

HighBredCloud

Well-known member
VIP
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];
 
tenacity11

tenacity11

Active member
2019 Donor
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
 
zeek

zeek

Active member
2019 Donor
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?
 
markos

markos

Well-known member
VIP
@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.
 
zeek

zeek

Active member
2019 Donor
@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.
Ok, thx. Will look around and see what i can find.
 
T

Trading51

Active member
2019 Donor
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. .
 
H

HighBredCloud

Well-known member
VIP
@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.
 
T

Trading51

Active member
2019 Donor
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!
 
H

HighBredCloud

Well-known member
VIP
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.
 
T

Trading51

Active member
2019 Donor
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.
 
T

Trading51

Active member
2019 Donor
Here is my version. I have some similar ones with different indicators that act like histogram colors too.




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.
 
television

television

Member
@YungTraderFromMontana wow. millionaire at 16 AND helping out your mother... wicked. If this aint motivation then i dont know what is. Also hope the treatment was a success and everything is well
 
T

Trade Small & Trade Smart

New member
VIP
@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
 
Last edited by a moderator:
B

bubz

New member
VIP
Is there a any way this can work on a tick chart, is that possible?
 
Top