Multi-Time Frame True Momentum Oscillator (MTF) for ThinkorSwim

This TMO indicator as well as the TMO with Higher Aggregation both work really well. But what works especially well, at least for me, is using both at the same time. On 1m charts I'll use both the 1m TMO and the 5m TMO. On 5m I'll use the 5m and the 15m. Entering when both are either green or red has become part of my core strategy.

The only problem with this is it's not always easy to notice the matching colors until it's too late.

Would it be possible to somehow merge both scripts so that a label can displayed and/or an alert can sound when both TMO's are pointing the same way?
@Yo Adrian make your way over to the OneNote and search under JQ or Nube. I trust you will find a variation there. https://usethinkscript.com/threads/the-universe-of-thinkscript-your-one-stop-research-shop.300/
 

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

Can multi time frame TMO be created using 2 or even 3 tick (range) charts.
Thanks in advance
I was wondering the same thing , did you have any luck with your question ? I use mostly range bar charts myself and Mobius original post works on both the range bar and tick charts but the multi time frame ones do not for some reason I don't know about .
 
"Since Tick charts do not use time as the basis, the following limiations are applied:
Studies that reference secondary aggregations of less than 1 day may not work properly on tick charts.

Read: Time&Tick: https://tlc.thinkpipes.com/center/charting/charts/Aggregation-Types/tickcharts.html
KZSv7CO.png
 
Multi-Timeframe True Momentum Oscillator - Three Timeframe version:

Code:
# filename: MR__EZ_TMO_MTF_Fisher_3Agg_
# source: https://usethinkscript.com/d/91-tmo-with-higher-agg-mobius-tsl

# 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 color.GREEN
                            else color.RED);
     Signal.AssignValueColor(if Main > Signal
                            then color.GREEN
                            else color.RED);
     Main.SetLineWeight(3);
     Signal.SetLineWeight(3);
     Signal.HideBubble();
     Signal.HideTitle();


# JQ_FisherTransform_wLabels v02
# assistance provided by AlphaInvestor, amalia, randyr and nube

# v02 9.23.2018 JQ added arrows

input Fisherprice = hl2;
input FisherLength = 10;
input TriggerLineOffset = 1; # Ehler's value of choice is 1
input TriggerLine_Color_Choice = {"magenta", "cyan", "pink", default "gray", "Mustard", "red", "green", "dark_gray", "Pale Yellow", "white"};
input deBug = no;

def maxHigh = Highest(Fisherprice, FisherLength);
def minLow = Lowest(Fisherprice, FisherLength);
def range = maxHigh - minLow;
def value = if IsNaN(Fisherprice)
then Double.NaN
else if IsNaN(range)
then value[1]
else if range == 0
then 0
else 0.66 * ((Fisherprice - minLow) / range - 0.5) + 0.67 * value[1];
def truncValue = if value > 0.99 then 0.999 else if value < -0.99 then -0.999 else value;
def fish = 0.5 * (Log((1 + truncValue) / (1 - truncValue)) + fish[1]);
def FTOneBarBack = fish[TriggerLineOffset];
def FT = fish;

plot FisherBullCross = if FT crosses above FTOneBarBack then lowestall(Main) else Double.NaN;
FisherBullCross.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
FisherBullCross.SetDefaultColor(Color.UPTICK);

plot FisherBearCross = if FT crosses below FTOneBarBack then highestall(Main) else Double.NaN;
FisherBearCross.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
FisherBearCross.SetDefaultColor(Color.DOWNTICK);


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 CreateColor(0, 125, 0) #Green
                                else CreateColor(125, 0, 0)); #Red;
     Signal3.AssignValueColor(if Main3 > Signal3
                                  then CreateColor(0, 125, 0) #Green
                                  else CreateColor(125, 0, 0)); #Red
     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();

plot ob = if isNaN(c) then double.nan else round(length * .7);
ob.SetDefaultColor(Color.dark_red);
ob.HideBubble();
ob.HideTitle();
plot os = if isNaN(c) then double.nan else -round(length * .7);
os.SetDefaultColor(Color.dark_green);
os.HideBubble();
os.HideTitle();
addCloud(ob, length, color.dark_red, color.dark_red, no);
addCloud(-length, os, color.dark_green, color.dark_green);
First of all I waned to thank you for this code.
If it possible can you add arrow when all 3 is red and all tree is green also yellow arrow when one of the changing color .
Thank you.
 
First of all I waned to thank you for this code.
If it possible can you add arrow when all 3 is red and all tree is green also yellow arrow when one of the changing color .
Thank you.
nVVr1s2.png

As you are aware, this is a MTF indicator. The long line of yellow arrows represent ONE bar on the upper aggregation.
That long line of arrows will continue to appear and disappear until the end of the line, at which point the upper timeframe bar will close, and it will repaint the line of arrows with the final closing price of the higher agg. It isn't possible to reduce the number of arrows because they represent a single arrow on the upper chart.

APPEND THE CODE BELOW TO THE BOTTOM OF YOUR SCRIPT:
Ruby:
def AllGreen = if Main > Signal and Main2 > Signal2 and Main3 > Signal3 then 1 else 0;
plot AllGreenArrow = if AllGreen==1 and AllGreen[1]==0 then Main else double.NaN;
     AllGreenArrow.SetDefaultColor(color.uptick);
     AllGreenArrow.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
     AllGreenArrow.SetLineWeight(2);

def AllRed   = if Main < Signal and Main2 < Signal2 and Main3 < Signal3 then 1 else 0;
plot AllRedArrow = if AllRed==1 and AllRed[1]==0 then Main else double.NaN;
     AllRedArrow.SetDefaultColor(color.red);
     AllRedArrow.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
     AllRedArrow.SetLineWeight(2);

def ChangingGreen = if Main crosses above Signal then 1 else 0;
plot ChangingGreenArrow = if ChangingGreen==1 and ChangingGreen[1]== 0 then Main else double.NaN;
     ChangingGreenArrow .SetDefaultColor(color.yellow);
     ChangingGreenArrow .SetPaintingStrategy(PaintingStrategy.ARROW_UP);
     ChangingGreenArrow .SetLineWeight(1);

def ChangingGreen2 = if Main2 crosses above Signal2 then 1 else 0;
plot ChangingGreenArrow2 = if ChangingGreen2==1 and ChangingGreen2[1]== 0 then Main2 else double.NaN;
     ChangingGreenArrow2 .SetDefaultColor(color.yellow);
     ChangingGreenArrow2 .SetPaintingStrategy(PaintingStrategy.ARROW_UP);
     ChangingGreenArrow2 .SetLineWeight(1);

def ChangingGreen3 = if Main3 crosses above Signal3 then 1 else 0;
plot ChangingGreenArrow3 = if ChangingGreen3==1 and ChangingGreen3[1]== 0 then Main3 else double.NaN;
     ChangingGreenArrow3 .SetDefaultColor(color.yellow);
     ChangingGreenArrow3 .SetPaintingStrategy(PaintingStrategy.ARROW_UP);
     ChangingGreenArrow3 .SetLineWeight(1);

def ChangingRed = if Main crosses below Signal then 1 else 0;
plot ChangingRedArrow = if ChangingRed==1 and ChangingRed[1]== 0 then Main else double.NaN;
     ChangingRedArrow .SetDefaultColor(color.yellow);
     ChangingRedArrow .SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
     ChangingRedArrow .SetLineWeight(1);

def ChangingRed2 = if Main2 crosses below Signal2 then 1 else 0;
plot ChangingRedArrow2 = if ChangingRed2==1 and ChangingRed2[1]== 0 then Main2 else double.NaN;
     ChangingRedArrow2 .SetDefaultColor(color.yellow);
     ChangingRedArrow2 .SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
     ChangingRedArrow2 .SetLineWeight(1);

def ChangingRed3 = if Main3 crosses below Signal3 then 1 else 0;
plot ChangingRedArrow3 = if ChangingRed3==1 and ChangingRed3[1]== 0 then Main3 else double.NaN;
     ChangingRedArrow3 .SetDefaultColor(color.yellow);
     ChangingRedArrow3 .SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
     ChangingRedArrow3 .SetLineWeight(1);
 
Is there a sharable link for this strategy. I cannot get the script to show anything when I simply copy-paste the code. Thanks!
 
Hi everyone, I'm new here. I'm looking for the script for a v02 of the MTF TMO indicator, which I've been looking for EVERYWHERE. I've combed through pages and pages of forum; I've tried to isolate certain time periods in google searches; I've changed queries several times to try and locate it. I believe it's a v02 of the original mobius TMO V01, but I'm not 100% sure. Does anyone recognize this, or can anyone offer any insight into how I might find the script for the indicator below? Thank you!
original_533486640-2.png
 
Hi everyone, I'm new here. I'm looking for the script for a v02 of the MTF TMO indicator, which I've been looking for EVERYWHERE. I've combed through pages and pages of forum; I've tried to isolate certain time periods in google searches; I've changed queries several times to try and locate it. I believe it's a v02 of the original mobius TMO V01, but I'm not 100% sure. Does anyone recognize this, or can anyone offer any insight into how I might find the script for the indicator below? Thank you! View attachment 18978

Try this https://tos.mx/0gOWx9B
 

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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