Follow Line Indicator For ThinkOrSwim

The ToS app does not allow for the use of MTF scripts in the scan hacker.
When setting up a scan, the first criteria is the timeframe.
It then filters your conditions on that timeframe.
If it encounters other timeframes in the script, it will throw an error:
Secondary timeframes not allowed.

added this lines for scanning purposes to the initial non-MTF version:

def trendo = if iTrend == 1 then 1 else if iTrend == -1 then -1 else trendo[1];
plot trend = trendo;

but was not able to make it work. maybe some sort of initialization is missing but I wouldn't know.
Could you please help?
 
Great indicator. How would we be able to scan with this?
To scan for the signal in multiple time frames
example for Long: scan for a 5 min long signal when the 15 min is already long
try this scan : http://tos.mx/cPvR8yQ
or
modify the script above, change the timeframe input to:
def period = getaggregationPeriod();

set a scan with 2 study conditions 1 for 15 min time frame and 1 for 5 min and
copy the script into each condition
in the 15 min condition scan for:
plot buymode = iTrend > 0; #( comment out all other plot statements)

in the 5 min condition scan for:
plot only the Buy condition ( comment out all other plot statements)

1711938745185.png
 

Attachments

  • 1711938970677.png
    1711938970677.png
    436.9 KB · Views: 44

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

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
390 Online
Create Post

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