TMO with Higher Agg_Mobius @ TSL

Hi All,

I would like to know if is possible to make a scanner to know when the 3 bands are in green like in the picture


oc9rStU.jpg
 
Oh Sorry my first post. Here is the code.

Code:
# filename: MR__EZ_TMO_MTF_
# source: [URL]https://usethinkscript.com/d/91-tmo-with-higher-agg-mobius-tsl[/URL]

# TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation
# Mobius
# V01.05.2018
#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 lower;

input length = 10; # default -> 14;
def calcLength = 5;
def smoothLength = 3;
input agg = AggregationPeriod.FIVE_MIN;

def o = open(period = agg);
def c = close(period = agg);
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);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
     Main.AssignValueColor(if Main > Signal
                                then CreateColor(0, 191, 0) #Green
                                else CreateColor(191, 0, 0)); #Red;
     Signal.AssignValueColor(if Main > Signal
                                  then CreateColor(0, 191, 0) #Green
                                  else CreateColor(191, 0, 0)); #Red
     Main.SetLineWeight(3);
     Signal.SetLineWeight(3);
     Signal.HideBubble();
     Signal.HideTitle();


input length2 = 10; # default -> 14;
def calcLength2 = 5;
def smoothLength2 = 3;
input agg2 = AggregationPeriod.FIFTEEN_MIN;

def o2 = open(period = agg2);
def c2 = close(period = agg2);
def data2 = fold i2 = 0 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);
plot Main2 = ExpAverage(EMA52, smoothLength2);
plot Signal2 = ExpAverage(Main2, smoothLength2);
     Main2.AssignValueColor(if Main2 > Signal2
                            then color.UPTICK
                            else color.DOWNTICK);
     Signal2.AssignValueColor(if Main2 > Signal2
                            then color.UPTICK
                            else color.DOWNTICK);
     Signal2.HideBubble();
     Signal2.HideTitle();

input length3 = 10; # default -> 14;
def calcLength3 = 5;
def smoothLength3 = 3;
input agg3 = AggregationPeriod.THIRTY_MIN;

def o3 = open(period = agg3);
def c3 = close(period = agg3);
def data3 = fold i3 = 0 to length3
           with s3
           do s3 + (if c3 > getValue(o3, i3)
                   then 1
                   else if c3 < getValue(o3, i3)
                        then - 1
                        else 0);
def EMA53 = ExpAverage(data3, calcLength3);
plot Main3 = ExpAverage(EMA53, smoothLength3);
plot Signal3 = ExpAverage(Main3, smoothLength3);
     Main3.AssignValueColor(if Main3 > Signal3
                            then color.UPTICK
                            else color.DOWNTICK);
     Signal3.AssignValueColor(if Main3 > Signal3
                            then color.UPTICK
                            else color.DOWNTICK);
     Signal3.HideBubble();
     Signal3.HideTitle();

addCloud(Main, Signal, color.GREEN, color.RED);
addCloud(Main2, Signal2, color.UPTICK, color.DOWNTICK);
addCloud(Main3, Signal3, color.DARK_GREEN, color.DARK_RED);

plot ZeroLine = 0;
     ZeroLine.SetDefaultColor(Color.ORANGE);
     ZeroLine.HideBubble();
     ZeroLine.HideTitle();
 
I plotted your code and it didnt look the same.
can you post a full screenshot of your chart so i can try and replicate ... and did you customize any settings?
 
Last edited:
oh boy this took some time to break down but here it is...
since it multiple time frame aggregation study also known as MTF ... you have to break each study into its own aggregation. so the 5 with the 5 the 15 with the 15 and the 30 with the 30.

SCANS FOR WHEN ALL THE MTF bands are showing Green

here is how it works. you are going to make a custom scan and just match up the aggregation with the timeframe under custom study on the scanner:

Capture.jpg




5 Min

Code:
# filename: MR__EZ_TMO_MTF_
# source: [URL]https://usethinkscript.com/d/91-tmo-with-higher-agg-mobius-tsl[/URL]

# TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation
# Mobius
# V01.05.2018
#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 lower;

input length = 10; # default -> 14;
def calcLength = 5;
def smoothLength = 3;
input agg = AggregationPeriod.FIVE_MIN;

def o = open(period = agg);
def c = close(period = agg);
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);
input length2 = 10; # default -> 14;
def calcLength2 = 5;
def smoothLength2 = 3;

plot scan =  Main > Signal;



15 MIN


Code:
# filename: MR__EZ_TMO_MTF_
# source: [URL]https://usethinkscript.com/d/91-tmo-with-higher-agg-mobius-tsl[/URL]

# TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation
# Mobius
# V01.05.2018
#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 lower;

input length2 = 10; # default -> 14;
def calcLength2 = 5;
def smoothLength2 = 3;
input agg2 = AggregationPeriod.FIFTEEN_MIN;

def o2 = open(period = agg2);
def c2 = close(period = agg2);
def data2 = fold i2 = 0 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);
plot scan =  Main2 > Signal2 ;




30MIN

Code:
# filename: MR__EZ_TMO_MTF_
# source: [URL]https://usethinkscript.com/d/91-tmo-with-higher-agg-mobius-tsl[/URL]

# TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation
# Mobius
# V01.05.2018
#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 lower;


input length3 = 10; # default -> 14;
def calcLength3 = 5;
def smoothLength3 = 3;
def agg3 = AggregationPeriod.THIRTY_MIN;
def o3 = open(period = agg3);
def c3 = close(period = agg3);
def data3 = fold i3 = 0 to length3 with s3  do s3 + (if c3 > getValue(o3, i3)    then 1 else if c3 < getValue(o3, i3)  then - 1   else 0);
def EMA53 = ExpAverage(data3, calcLength3);
def Main3 = ExpAverage(EMA53, smoothLength3);
def Signal3 = ExpAverage(Main3, smoothLength3);
plot scan = Main3 > Signal3;
 
Last edited:
The scanner that I put together is attached to post #56 in this thread. It basically scans for names where the main has crossed over the signal line (in the same general timeframe) for the day, week, and month. I will also be trying to put together an "Anti-scanner" for the inverse of the conditions that intersects with it so that TOS will notify me when one of the names that came up on the scanner no longer meet the criteria so I can have some redundancy in letting me know when its time look at getting out. Hope this helps. If you find a way to tweak it to make it more effective please let me know!
Did you make it back in after the blow up?
 
Did you ever figure this out? I'm wondering the exact same thing
@Ronin13 By it's very nature, Mobius coded this for time only. I don't know of anyone that has it for tick charts. I believe it would be impossible to get the Delta of Price without a time frame in which to divide it. Try the Basic RSI Laguerre for tick charts. That will work on ticks.... Good Luck.
 
This is my main chart set up, without TMO,.....Markos, I thought I would try your Laguerre as main indicator, otherwise I use price as you can see and one last item, my lightbulb, once I viewed a video a few years back, it was my lightbulb,........I literally almost cried as the concept was so simple, my education, although Stockbee is my other guru ,
Hi Thomas. Have you seen where Doug Campbell from Right Way options where he uses a volatility stop indicator and then modifies it to a moving average instead of price? video attached below. explanation is at 11min 15 seconds?
 
Hello, Is there a solution for the TMO spacing for Globex you will notice on the Globex that we didn't have a holiday, and the MTF aggregation for the 2 hours has a spacing issue, was curious if there was a way to fix this?
 
Hello, Is there a solution for the TMO spacing for Globex you will notice on the Globex that we didn't have a holiday, and the MTF aggregation for the 2 hours has a spacing issue, was curious if there was a way to fix this?
@Trading51 I haven't seen that before. It may be the Globex session, I'm not sure. My thought was that when it was created, it was meant for regular trading hours, but that shouldn't cause the price to drop out anyway. Try changing the time frames to see what it might be. You'll have to be the detective on this one and let us know what you find.
 
@Trading51 I haven't seen that before. It may be the Globex session, I'm not sure. My thought was that when it was created, it was meant for regular trading hours, but that shouldn't cause the price to drop out anyway. Try changing the time frames to see what it might be. You'll have to be the detective on this one and let us know what you find.
I noticed it has only happened on the higher time frames with Globex, any thoughts on how to close this blank spot? Thanks
 
So i'm trying to overlap the agg, and would like to change the color from green to say white or something. Can someone modify to where that is a selectable option under the agg entry? I do like that someone had the first set up as an oscillator. I was thinking I would add a third being a Daily main, and Weekly for the Agg, and have a four hour for additional entry or something. MTF stuff makes my head spin.
also, I'm trying to get a scan working, but the normal version has no criteria that shows up other than the crossing or greater than section etc, but the MTF version complains about the higher aggregate.
 
Last edited:
TMO and the Amazing Technicolor Dreamcoat
This version of the TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation uses Global Colors so the colors on the chart can be edited.
Ruby:
# TMO ((T)rue (M)omentum (O)scillator) With Higher Aggregation
# 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 = 14;
input calcLength = 5;
input smoothLength = 3;
input agg = AggregationPeriod.Fifteen_min;
DefineGlobalColor("Bull", CreateColor(217,61,255)) ;
DefineGlobalColor("Bear", CreateColor(255,216,61)) ;
DefineGlobalColor("overbought", CreateColor(255,216,61)) ;
DefineGlobalColor("oversold", CreateColor(255,216,61)) ;

def o = open(period = agg);
def c = close(period = agg);
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);
plot Main = ExpAverage(EMA5, smoothLength);
plot Signal = ExpAverage(Main, smoothLength);
     Main.AssignValueColor(if Main > Signal
                           then GlobalColor("Bull")
                           else GlobalColor("Bear"));
     Signal.AssignValueColor(if Main > Signal
                             then GlobalColor("Bull")
                             else GlobalColor("Bear"));
     Signal.HideBubble();
     Signal.HideTitle();
addCloud(Main, Signal, GlobalColor("Bull"), GlobalColor("Bear"));
plot zero = if isNaN(c) then double.nan else 0;
     zero.SetDefaultColor(Color.gray);
     zero.hideBubble();
     zero.hideTitle();
plot ob = if isNaN(c) then double.nan else round(length * .7);
     ob.SetDefaultColor(Color.gray);
     ob.HideBubble();
     ob.HideTitle();
plot os = if isNaN(c) then double.nan else -round(length * .7);
     os.SetDefaultColor(Color.gray);
     os.HideBubble();
     os.HideTitle();
addCloud(ob, length, GlobalColor("overbought"), GlobalColor("overbought"), no);
addCloud(-length, os, GlobalColor("oversold"), GlobalColor("oversold"));
# End Code TMO with Higher Aggregation

To Edit Global Colors
  1. Click on the gear icon next to the TMO indicator
  2. At the bottom of the Edit Box, Click on Global
  3. There are four colors: bull and bear, overbought and oversold. Click on them to change them to whatever you want.
  4. Click ok
r8hqYCH.png

@tome HTH
 
Last edited:
@Ben Could you please move the above post? @DOUBLE MOVE posted this in the wrong thread. @DOUBLE MOVE is referencing @netarchitech Mr_EZ_MTF indicator, not Mobius's TMO.

@DOUBLE MOVE use MSPaint or some coloring program and illustrate what the upper and lower definitions of your cloud would be. Then post your pic. Because obviously, no cloud will fit between STCTREND, STCWAVE ,AGG1and AGG2 because by your definition they are all smooshed together at the top or the bottom; no room for cloudiness between them.
 
Last edited:

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

Thread starter Similar threads Forum Replies Date
tenacity11 Archived: TMO True Momentum Oscillator Indicators 346
BenTen TMO True Momentum Oscillator For ThinkOrSwim Indicators 121

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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