lowest level would be perfectly timing the price movement at the lowest level, since that's not possible the best you can do is specify when the indicator has reached below XYZ number.@unkownriver Define "when the momentum is at lowest level"
lowest level would be perfectly timing the price movement at the lowest level, since that's not possible the best you can do is specify when the indicator has reached below XYZ number.@unkownriver Define "when the momentum is at lowest level"
Hello MerryDay, What is $tmo in presented screen, can you pls point me to post which allows to get these numbers if they are TMO lower study numbers from post #1
all you had to do was search this thread or use the forum's search featureHello MerryDay, What is $tmo in presented screen, can you pls point me to post which allows to get these numbers if they are TMO lower study numbers from post #1
# 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, trend reversals and divergence than momentum oscillators using price.
input length = 14;
input calcLength = 5;
input smoothLength = 5;#3
input level = -5; ##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);
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.
##[B][I]Bullish Scan[/I][/B]
#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];
##[B][I]Bearish Scan[/I][/B]
#plot scan = main > level and signal > level and main < signal;
#plot scan = main > main[1] and signal > signal[1];
Merry, this TMO is the first indicator I found, ever, that worked, meaning, tradeable information. How did you come about the input levels, I saw on another BTD/TMO level smaller input numbers, based on a daily chart,.... has someone posted optimal levels to adjust results. If TMO truly reacts from Delta/Options, then I will discard everything for only this to help assist in trading decisions, because this works.
# 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.
# Modified by BenTen 03/24/2021: added arrows to upper chart
input length = 14;
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);
plot up = if Main crosses above Signal then low else double.nan;
plot down = if Main crosses below Signal then high else double.nan;
up.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
down.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
# 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 = 14;
input calcLength = 5;
input smoothLength = 3;
#input symbol = "SPX";
def o = open;#(symbol);
def c = close;#(symbol);
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);
Signal.HideBubble();
Signal.HideTitle();
addCloud(Main, Signal, color.green, color.red);
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, color.light_red, color.light_red, no);
addCloud(-length, os, color.light_green, color.light_green);
input showBreakoutSignals = no;
plot longsignal = if main crosses above signal then main else Double.NaN;
plot shortSignal = if main crosses below signal then signal else Double.NaN;
longSignal.SetHiding(!showBreakoutSignals);
shortSignal.SetHiding(!showBreakoutSignals);
longsignal.SetDefaultColor(Color.UPTICK);
longsignal.SetPaintingStrategy(PaintingStrategy.ARROW_UP);
shortSignal.SetDefaultColor(Color.DOWNTICK);
shortSignal.SetPaintingStrategy(PaintingStrategy.ARROW_DOWN);
# End Code TMO
Hi @MerryDay I have a quick question. When I add the WL column do I select 5 min or a day? Thanks in advance@JE $$
You could make a watchlist
Shared Link: http://tos.mx/6HaRN1aRuby:# ######################################################## # TMO ((T)rue (M)omentum (O)scilator) WatchList Column Only # Mobius, with modifications by tomsk, 1.1.2020 #with WatchList added by @MerryDay 12/2020 #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 showlabels = yes ; input length = 14; input calcLength = 5; input smoothLength = 3; input tmo_ob = 10; input tmo_os = -10; def data = fold i = 0 to length with s do s + (if close > getValue(open, i) then 1 else if close < getValue(open, i) then - 1 else 0); def EMA5 = ExpAverage(data, calcLength); def Main = ExpAverage(EMA5, smoothLength); def Signal = ExpAverage(Main, smoothLength); # ######################################################## #charting and formatting plot TMO = round(main,0); #DefineGlobalColor("pretrend", CreateColor(50, 200, 255)) ; #DefineGlobalColor("TrendBEGIN", CreateColor(0, 0, 255)) ; #DefineGlobalColor("rising", CreateColor(0, 165, 0)) ; #DefineGlobalColor("maxxed", CreateColor(255, 139 ,61)) ; #DefineGlobalColor("TrendEnd", CreateColor(255, 204, 0)) ; #DefineGlobalColor("falling", CreateColor(225, 0, 0)) ; #DefineGlobalColor("neutral", CreateColor(204, 204, 204)) ; AssignBackgroundColor( if main < tmo_os then CreateColor(50, 200, 255) else if main > tmo_ob then CreateColor(255, 139 ,61) else if main crosses above tmo_os then CreateColor(0, 0, 255) else if main crosses below tmo_ob then CreateColor(255, 204, 0) else if main < signal then CreateColor(225, 0, 0) else if main > main[1] then CreateColor(0, 165, 0) else CreateColor(204, 204, 204)) ;
# 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.
#4/13/21 @rlohmeyer modified raw code and normalized for RSI scale
declare Lower;
input data_length = 14;
input EMA_Length = 5;
def o = open;
def c = close;
def data = fold i = 0 to data_length with s do s + (if c > getValue(o, i) then 1 else if c < getValue(o, i) then - 1 else 0);
def Main = ExpAverage(data, EMA_Length);
#Scale Normalization Code
def hh = Round(highestAll(main),2);
def ll = Round(lowestall(main),2);
plot TMO = ((main-ll)/(hh-ll))*100;
TMO.setdefaultColor (color.yellow);
# 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 = 14;
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);
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);
Signal.HideBubble();
Signal.HideTitle();
addCloud(Main, Signal, color.green, color.red);
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, color.light_red, color.light_red, no);
addCloud(-length, os, color.light_green, color.light_green);
# End Code TMO
# 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.
#@rlohmeyer: RSI,TMO on normalized scale
declare lower;
#Scale Normaliztion Script
script normalizePlot {
input normalize_data = close;
input MinRng = -1;
input MaxRng = 1;
def HH = HighestAll( normalize_data );
def LL = LowestAll( normalize_data );
plot NR = ((( MaxRng - MinRng ) * ( normalize_data - LL )) / ( HH - LL )) + MinRng;
}
#TMO
input Tmo_Price = close;
input Tmo_data_length = 5;
input Tmo_Ema_Length = 5;
def o = open;
def TMOdata = fold i = 0 to TMO_data_length with s do s + (if TMO_price > getValue(o, i) then 1 else if TMO_price < getValue(o, i) then - 1 else 0);
def TMOavg = ExpAverage(TMOdata, TMO_EMA_Length);
#RSI
input RSI_price = close;
def RSI_Average = AverageType.WILDERS;
input RSI_Avg_Length = 2;
def NetChgAvg = MovingAverage(RSI_Average, RSI_price - RSI_price[1], RSI_Avg_Length);
def TotChgAvg = MovingAverage(RSI_Average, AbsValue(RSI_price - RSI_price[1]), RSI_Avg_Length);
def ChgRatio = if TotChgAvg != 0 then NetChgAvg / TotChgAvg else 0;
def RS = 50 * (ChgRatio + 1);
input Rsi_Ema_Length = 2;
def RSIavg = ExpAverage(RS, RSI_EMA_Length);
#RSI2
input RsiTwoPrice = close;
def RsiTwoAverage = AverageType.WILDERS;
input RsiTwoAvgLength = 2;
def NetChgAvg2 = MovingAverage(RsiTwoAverage, RsiTwoPrice - RsiTwoPrice[1], RsiTwoAvgLength);
def TotChgAvg2 = MovingAverage(RsiTwoAverage, AbsValue(RsiTwoPrice - RsiTwoPrice[1]), RsiTwoAvgLength);
def ChgRatio2 = if TotChgAvg2 != 0 then NetChgAvg2 / TotChgAvg2 else 0;
def RS2 = 50 * (ChgRatio2 + 1);
input RsiTwoEmaLength = 2;
def RSIavg2 = ExpAverage(RS2, RsiTwoEmaLength);
#Scale parameters
input MaxRng = 100;#Max range value
input MinRng = 0;#Min range value
input OBH = 95;
input OBL = 90;
Addcloud(OBH,OBL,color.green);
input OSH = 10;
input OSL = 5;
Addcloud(OSH,OSL,color.red);
#Scale normalization based on parameters
def newTMO = normalizePlot(TMOavg, MinRng, MaxRng );
def newRSI = normalizePlot(RSIavg, MinRng, MaxRng );
def newRSI2 = normalizePlot(RSIavg2, MinRng, MaxRng );
#Plots
plot TMO = newTMO;
TMO.setdefaultColor(color.yellow);
TMO.Hidebubble();
TMO.hidetitle();
plot RSI = newRSI;
RSI.setdefaultColor(color.cyan);
RSI.hidebubble();
RSI.hidetitle();
plot RSI2 = newRSI2;
RSI2.setdefaultColor(color.magenta);
RSI2.hidebubble();
RSI2.hidetitle();
plot Mid = (MaxRng + MinRng)/2;
Mid.setdefaultColor(color.light_gray);
Mid.hidebubble();
Mid.hidetitle();
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.