stocksniper
Member
Does someone know how to add arrows to the script when TMO study turns green.
Join useThinkScript to post your question to a community of 21,000+ developers and traders.
def BUYsignal = Main crosses above Signal;
def SELLsignal = Main crosses below Signal;
addverticalline(BUYsignal,"Buy",color.green,curve.firm);
addverticalline(SELLsignal,"Sell",color.red,curve.firm);
def BUYsignal =Main < OS and Main crosses above Signal;
def SELLsignal = Main > OB and Main crosses below Signal;
addverticalline(BUYsignal,"Buy",color.green,curve.firm);
addverticalline(SELLsignal,"Sell",color.red,curve.firm);
You want the one that Main crosses above the Signal?yeah...that's the one that I have...but its not the one that scans for the color change...The one you have is when it crosses above or below the Over Bought Over Sold condition...
Yes...I think that is the one...Is that the one that reflects the color change from GREEN to RED and vice versa?You want the one that Main crosses above the Signal?
TrueMomentumOscillator_14()."Main" crosses above TrueMomentumOscillator_14()."Signal"Yes...I think that is the one...Is that the one that reflects the color change from GREEN to RED and vice versa?
You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.TrueMomentumOscillator_14()."Main" crosses above TrueMomentumOscillator_14()."Signal"
See if that is what you want
# 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 = -10; ##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);
#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 < 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];
You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.
I have the TMO scanner that you have that tomsk made...also I tried to implement other TMO scanner into it...just not sure if I commented out the right things and if I put them int the appropriate scan parts of Bullish or Bearish...
I guess for anyone that is interested assuming what I did was right...Someone that knows what they are doing please confirm.
Code:# 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 = -10; ##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); #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 < 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];
@HighBredCloud Good day, any way that you could assist me with getting setup with scan, with some brief instructions on setting up, like where and how thanks. .You don't have the Thinkscript Editor version by chance do you? I don't use the condition wizard.
I have the TMO scanner that you have that tomsk made...also I tried to implement other TMO scanner into it...just not sure if I commented out the right things and if I put them int the appropriate scan parts of Bullish or Bearish...
I guess for anyone that is interested assuming what I did was right...Someone that knows what they are doing please confirm.
Code:# 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 = -10; ##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); #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 < 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];
@HighBredCloud Good day, any way that you could assist me with getting setup with scan, with some brief instructions on setting up, like where and how thanks. .
Your welcome...I would just verify the code if I got the Bullish and Bearish correct from post #127...I think I had them reversed in the post in this thread because opposite results would come out at times. Nobody verified tho so its hard for me to say...Perhaps @BenTen could take a look and verify so that you don't your scan search doesn't pull out the wrong results.Hey man thanks for taking the time to reply much appreciated ! Be safe!
Do you know the steps that I can take to set this up in a custom column, that's what I'm trying to add, I don't need the scanner I'm looking for the visual column. Thanks.Your welcome...I would just verify the code if I got the Bullish and Bearish correct from post #127...I think I had them reversed in the post in this thread because opposite results would come out at times. Nobody verified tho so its hard for me to say...Perhaps @BenTen could take a look and verify so that you don't your scan search doesn't pull out the wrong results.
@subharmonic Would it be ok to share your custom Column for the TMO, I'm trying to set one up thanks.Here 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);
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.