TMO Squeeze Dashboard For ThinkOrSwim

ChiliPepper

New member
Is the above code updated to reflect this update ?
Here's the updated code below:

#Start_TMO_CODE_Created_By_Mobius**********
#Found here https://usethinkscript.com/threads/tmo-true-momentum-oscillator-for-thinkorswim.9413/
# 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.

def length = 14;
def calcLength = 5;
def 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);
def zero = if isNaN(c) then double.nan else 0;
def ob = if isNaN(c) then double.nan else round(length * .7);
def os = if isNaN(c) then double.nan else -round(length * .7);
#End_TMO_CODE*_Created_By_Mobius***********

#****************************************************************************************************
#Defining Conditions - a change in momemtum and TMO os/ob levels

#Bullish Signal
def SH = TTM_Squeeze().Histogram;
def HistogramUp = if SH[0] > SH[1] then 1 else 0;
def TMO_MomentumUp = Main <= os and HistogramUP or Main <=os and HistogramUp;
def BullSignal = !TMO_MomentumUp[1] and TMO_MomentumUp;

#Bearish Signal
def HistogramDown = if SH[0] < SH[1] then 1 else 0;
def TMO_MomentumDown = Main >= ob and HistogramDown or Main >=ob and HistogramDown;
def BearSignal = !TMO_MomentumDown[1] and TMO_MomentumDown;

AddLabel(yes, if BullSignal then "Calls" else if BearSignal then "Puts" else " ");
AddLabel(BullSignal, "Calls", color.black);
AddLabel(BearSignal, "Puts", color.black);
AssignBackgroundColor(if BullSignal then color.light_green else if BearSignal then color.pink else color.black);
 
How do you get the study to be a column on the scan/watchlist table?
Click on the gear icon on the watchlist table then select Custom
on the drop down list under "Available Items" select Custom Quotes then select one of the Custom study then click Add Items
then on the right side, under "Current Set" click on the scroll icon next to the Custom study and paste in the code
then on the top give it a name. You can change the "D" for a shorter time frame if you want.

I hope this helps.
 

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

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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