Join useThinkScript to post your question to a community of 21,000+ developers and traders.
# 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();
# 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;
# 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 ;
# 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;
Did you make it back in after the blow up?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 ever figure this out? I'm wondering the exact same thingGood afternoon, does anyone know how to setup the TMO lower script for a Tick chart instead of time based? Thanks
@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.Did you ever figure this out? I'm wondering the exact same thing
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?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 ,
@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.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?
I noticed it has only happened on the higher time frames with Globex, any thoughts on how to close this blank spot? Thanks@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.
# 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
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Archived: TMO True Momentum Oscillator | Indicators | 346 | ||
TMO True Momentum Oscillator For ThinkOrSwim | Indicators | 128 |
Start a new thread and receive assistance from our community.
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.
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.