UT Bot For ThinkOrSwim

The first line of this code says that it is a strategy only. How could a person transform this into a study so that scans could be run? I've tried to open this code in the Scanner, but I can't find the indicator existing as a study.

Thanks for any help,

To scan this script:
https://usethinkscript.com/threads/ut-bot-for-thinkorswim.12640/#post-116615
Change these lines of code from:
def buy = src > xATRTrailingStop and above ;
def sell = src < xATRTrailingStop and below;
to this:
plot buy = src > xATRTrailingStop and above ;
plot sell = src < xATRTrailingStop and below;

And then set up your scan, following this tutorial:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

The condition will be:
buy is true
 
Last edited:
I have one more question, and I will try to be much more careful with the explanation this time. :)

Your instructions above to scan for a recent buy signal are spot on.

Let's say I wanted to scan for symbols that didn't crossover on the most recent data point, but instead I wanted to find symbols that were currently under a buy condition - no matter when they crossed over. For example this screenshot has been green (under a UTBOT buy condition) for the past 10 days or so. I just want capture it as being under a "Buy" condition.

I want to use this to combine some timeframes. Find crossovers on short timeframes that have acually been under a buy condition for the past several days.

Thank you for your willingness to teach.

Screenshot 2024-02-11 011007.png
 
I have one more question, and I will try to be much more careful with the explanation this time. :)

Your instructions above to scan for a recent buy signal are spot on.

Let's say I wanted to scan for symbols that didn't crossover on the most recent data point, but instead I wanted to find symbols that were currently under a buy condition - no matter when they crossed over. For example this screenshot has been green (under a UTBOT buy condition) for the past 10 days or so. I just want capture it as being under a "Buy" condition.

I want to use this to combine some timeframes. Find crossovers on short timeframes that have acually been under a buy condition for the past several days.

Thank you for your willingness to teach.

To scan for stocks that have a bullish trend (green candles)
Change this line of code from:
def barbuy = src > xATRTrailingStop ;
to:
plot barbuy = src > xATRTrailingStop ;

Follow the instructions in the scanner tutorial:
https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

And set the condition to:
barbuy is true
(y)
 
I've noticed that this script is a repaint- keeps changing arrow color before candle close
That's not repainting. Repainting is when it will give a signal after the candle closes and then the signal goes away after subsequent candles. The signal changing while the candle continues to develop is normal and is working properly. Wait for candle close for definitive confirmation.
 

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
189 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