vince92615
New member
is there TMO watchlist or scanner available?
Does anyone know how to add this to Multicharts.net platform? I know you can import easylanguage according to their websiteGot the TMO (including MTF) working in EasyLanguage / Tradestation for anyone interested. To setup multiple time frames in TradeStation see this post: https://futures.io/easylanguage-pro...rame-programming-easylanguage.html#post154004
If you prefer not to have the MTF, just delete everything below {Data2}.
Code:{TMO ((T)rue (M)omentum (O)scilator) - Universal Edition with Multiple Time Frames originally created by Mobius, modified by hCaostrader, and ported to EasyLanguage with Multiple Time Frame capability added by TraderKevin V12.8.2020 TMO calculates momentum using the delta of price. Giving a much better picture of trend, tend reversals and divergence than momentum oscillators using price.} inputs: Length( 14 ) [ DisplayName = "Length", ToolTip = "Enter the number of bars to be used in the calculation of the TMO."], calcLength( 5 ) [ DisplayName = "calcLength", ToolTip = "Enter the number of bars to be used in the calculation of the calcLength."], smoothLength( 3 ) [ DisplayName = "smoothLength", ToolTip = "Enter the number of bars to be used in the calculation of the smoothLength."], Cloud(False) [ DisplayName = "Cloud", ToolTip = "True to display cloud, false to disable."]; variables: x( 0, data1 ), normdata(0, data1), ema(0, data1), main(0, data1), signal(0, data1), ob(0, data1), os(0, data1), dat(0, data1), y(0, data1), intrabarpersist double uptrans(0), intrabarpersist double downtrans(0), intrabarpersist double span(0, data1), gap(0, data1), x2( 0, data2 ), normdata2(0, data2), ema2(0, data2), main2(0, data2), signal2(0, data2), dat2(0, data2), y2(0, data2), intrabarpersist double uptrans2(0), intrabarpersist double downtrans2(0), intrabarpersist double span2(0, data2), gap2(0, data2);; {Data1} dat = 0; for x = 1 to Length Begin if c > c[x] Then y = 1 else if c < c[x] Then y = -1 else y = 0; dat = dat + y ; end; normdata = dat * 100 / length; ema = XAverage(normdata, calcLength); main = XAverage(ema, smoothLength); signal = XAverage(main, smoothLength); ob = 70; os = -70; uptrans = ARGB( 100, 0, 128, 0 ); downtrans = ARGB( 100, 255, 0, 0 ); plot1(main, "Main", iff(main > signal, Green, Red)); plot2(signal, "Signal", iff(main > signal, green, red)); plot3(0, "Zero", Lightgray); plot4(ob, "OB", Darkred); plot5(os, "OS", Darkgreen); span = 0.5 * (main + signal); gap = main - signal; if cloud then plot6(span, "Cloud", iff(main > signal, uptrans, downtrans), default, iff(gap > 10, 13, 11)); {Data2} dat2 = 0; for x2 = 1 to Length Begin if c of data2 > c[x2] of data2 Then y2 = 1 else if c of data2 < c[x2] of data2 Then y2 = -1 else y2 = 0; dat2 = dat2 + y2 ; end; normdata2 = dat2 * 100 / length; ema2 = XAverage(normdata2, calcLength); main2 = XAverage(ema2, smoothLength); signal2 = XAverage(main2, smoothLength); plot7(main2, "Main2", iff(main2 > signal2, darkcyan, Darkmagenta)); plot8(signal2, "Signal2", iff(main2 > signal2, darkcyan, Darkmagenta)); span2 = 0.5 * (main2 + signal2); gap2 = main2 - signal2; if cloud then plot9(span2, "Cloud", iff(main2 > signal2, uptrans, downtrans), default, iff(gap2 > 10, 13, 11));
what is OB,OS stand forHere 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);
Yes the above code is for the above scan. I saw in one column he put TMO_4 TMO_D TMO_W. SO HE modified the code to show momentum for those time frames. I am looking for a way to modify the code to show me where the momentum is by the 1min 3 and 5min charts.GM, is the above code for the above scan?
Click on the gear icon to the right of the timeframe, then click customize and double click the TMO and change the timeframe on the top of the page to whatever you choose. I would also change the label of the column nameYes the above code is for the above scan. I saw in one column he put TMO_4 TMO_D TMO_W. SO HE modified the code to show momentum for those time frames. I am looking for a way to modify the code to show me where the momentum is by the 1min 3 and 5min charts.
Just change the aggregation period to your specific time frameHow do I modify this so as to make it specific for 1min, 3min and 5min? do I change length .7 to something else? what does .7 represent, minutes or week?
thank you, didn't realize the time frame was right next to the title.Click on the gear icon to the right of the timeframe, then click customize and double click the TMO and change the timeframe on the top of the page to whatever you choose. I would also change the label of the column name
Read the thread or use the search function and you may be rewardedThis is hand down my favorite indicator in TOS. I have made quite a few customizations. Can someone explain exactly what this part of the code means:
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);
I use both ThinkorSwim & TradeStation. I am looking to translate this TMO indicator to EasyLanguage. I dont expect anyone to code this for me in EL, but was just curious if anyone could explain this as simply as possible in order for me to write my own code.
Thanks in advance.
@martinstocks87 fold is used to count forward from starting point to a end point as long as the variable(study) is true then it will do (perform) the specified study(expression). That final "expression" can be a loop if you want it to, its up to you.This is hand down my favorite indicator in TOS. I have made quite a few customizations. Can someone explain exactly what this part of the code means:
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);
I use both ThinkorSwim & TradeStation. I am looking to translate this TMO indicator to EasyLanguage. I dont expect anyone to code this for me in EL, but was just curious if anyone could explain this as simply as possible in order for me to write my own code.
Thanks in advance.
@XeoNoX Is the start position the current bar - length making the range covered by fold in this example current bar - length thru and including the current bar?@martinstocks87 fold is used to count forward from starting point to a end point as long as the variable(study) is true then it will do (perform) the specified study(expression). That final "expression" can be a loop if you want it to, its up to you.
in your example:
fold is used to count forward from 0 to the defined "length"... and as long as "S" is true then it will do (perform) the following study of
(if c > getValue(o, i)
then 1
else if c < getValue(o, i)
then - 1
which seeks to see if the study returns a value of 1 or -1 and if neither then it returns 0
Attached image in mind is lowest point when curve touches at -15 (green zone) and moves upward. So this would be optimal point to find stock ready to move upward momentum.@unkownriver Define "when the momentum is at lowest level"
Hi Ben, Could you please point me to post which has the scanner code. I will play around as per your suggesstion. Thank you@unkownriver You can do something like "Main is less than or equal to -15"
# 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 = -15; ##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);
plot Main = ExpAverage(EMA5, smoothLength);
def Signal = ExpAverage(Main, smoothLength);
addchartBubble(close,close,main);
plot sell = main crosses below 10 ;
#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 crosses above level;
#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];
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
Thread starter | Similar threads | Forum | Replies | Date |
---|---|---|---|---|
Archived: RSI Divergence Indicator | Indicators | 131 | ||
Archived: Opening Range Breakout | Indicators | 340 | ||
Archived: Supertrend Indicator by Mobius for ThinkorSwim | Indicators | 312 | ||
TMO with Higher Agg_Mobius @ TSL | Indicators | 204 | ||
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.