Want To Setup A Conditional Order In ThinkOrSwim

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

The Conditional Order needs to be set up manually, each time you want to make a trade. The ToS platform does not support autotrading.
To use the Twin Range Filter in an OCO, find and change these two lines in the script:
https://usethinkscript.com/threads/twin-range-filter-for-thinkorswim.12831/#post-115977
Ruby:
def long = longCond and CondIni[1] == -1;
def short = shortCond and CondIni[1] == 1;
to these two lines:
Ruby:
plot long = longCond and CondIni[1] == -1;
plot short = shortCond and CondIni[1] == 1;

The manual setup for conditional orders is identical to the manual setup for the scan hacker and for chart alerts.
Which works out perfectly because this means we can use the scanner and chart alerts to test that your conditional order will do what you want it to do.

To Test and Setup Conditional Orders
1. First put your signals in the scan hacker. This is to verify that you have correctly defined the conditions you want to make entry on and that it runs without errors and finds signals. Need help setting up the scanner? Here is a tutorial: https://usethinkscript.com/threads/how-to-use-thinkorswim-stock-hacker-scans.284/

2. Everything worked well with the scanned signals? Now right-click on any chart. Then click on chart alert. You have now opened the Condition Wizard for the chart alert. Fill it in the same way as the scan hacker. Verify that your filter runs without errors and generates an alert. This has the added benefit that. You can save this alert! Awesome! Because unfortunately, conditional orders are once and done, and they are not saved. It is a PITA to have to manually enter them each time. However, conditional orders can call your saved chart alerts, so you don't have to keep re-typing it.. So cool!

3. If the chart alert fired in the manner that you want, you can now create your conditional order.
It should be noted that the ToS condition wizard has limited capabilities. It only likes simple scripts. Many scripts time out and / or are too complex, or cannot be used. This is why doing the testing as outlined above is so important.
 
Last edited:

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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