• Get $40 off VIP by signing up for a free account! Sign Up

API Trading w/ Thinkorswim


Well-known member
I know this isn't directly related to thinkscript but it would be cool to try and convert some strategies on tos to another platform where you can trade automatically. I know it would be difficult switching from TOS's meta language but it could be worth it.

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

I know this isn't directly related to thinkscript but it would be cool to try and convert some strategies on tos to another platform where you can trade automatically. I know it would be difficult switching from TOS's meta language but it could be worth it.


Yes, I did using StrategyDesk which is no longer available from TD Ameritrade. I used it to auto trade a number of ultra ETFs when they first came out.

I stopped using when I moved to Japan. A few years latter TD Ameritrade stop supporting StrategyDesk (SD).

With SD you wrote your own code and then you could trade like TOS or use SD’s auto trade function. The thing about auto trading - you must know and understand the code you are trading or you will loss big.

More than likely TD had a number of customers using auto trade that blamed TD for their mass losses. The mass losses were more than likely due to their failure to truly understand the code and just what auto trading is.

Just know your code VERY WELL if you decide to go down the auto trading path.
Last edited:
I'd also co-locate where price servers are, most likely whatever strat you're thinking of, has already been modelled and 'their' servers are watching for you

I'm new to this forum and new to ThinkOrSwim. (A couple months in).

I have a number of Advanced Orders that I want to have repeat when they are filled. Ameritrade informed me that ThinkOrSwim won't do this directly but it can be done with ThinkScript or the API.

If I don't need to get a new Endpoint setup and code all of this - time savings - to say the least.

Is anyone aware of what could be done in ThinkScript that could allow for an Advanced Order to be repeated when filled?

Or, even triggered with an Alert (that I could set to the same parameter as what would fill the order at the top end or lower end of a bracket).

Any other thoughts?
I asked how I can accomplish it in every way I could imagine within ThinkOrSwim - (non-traditional Triggers - or Triggers phrased differently) but couldn't find an answer that worked.

I wasn't aware that it was once a part of TOS, so I didn't ask this specifically.

The ability to Start an Advanced Order from another Advanced Order would function for my use case but they are indicating they can't find a way to trigger an Advanced Order - only Standard Orders from within TOS.

I find it hard to believe it can't be done - somehow as the API docs clearly provide an endpoint for Creating an Advanced Order.

How they don't have other triggers for it - well, I think there are but I don't know them.
The API allows this to be completed which would make me think that ThinkScript or another Trigger within ThinkOrSwim could be used to achieve the same action.

There are plenty of triggers for a Standard Order - the issue is triggering an Advanced Order.

However, their API docs support an Advanced Order being created.

The event simply would be a Sell. (Or, possibly the same price as what triggers the sell - or slightly higher to allow time for it to fill.)
Thinkorswim Robot is 100% automated software that defines the best trend enter trade orders in the place of a human trader.
Would never trust any robot unless i had the chance to inspect the source code thoroughly and fully understanding what it does and most importantly, what type of risk management is implemented. Even then, i would be sceptical because if it was that simple, everyone could just buy a robot and sit back and count all the profits.

The only way i would be interested (and i am) is if i could code the strategy myself or if someone helped me code it just the way i want it. Unfortunately, there is currently no way to do this for stocks that i am aware of but i will welcome the day when this opportunity exists.
You may want to consider reading Virtu's IPO docs and "insights into high frequency trading from the virtu ipo" by Greg Laughlin , esp page 3
Algo trading does not have to be high frequency, I have a trading bot that can trade many markets at the same time. it take indice day trades only and only picks out a few a day
It is not done easily, and order management is the hardest part to get right. API or a few platforms will accept autotrading like ninja
Orders have to be directed to a brokerage firm and then how would you like that trade managed after it is place. This backend stuff is much harder to work with than setting up what ever your reason for taking the trade in the first place.
order management?

Its not that difficult, depending on your committed capital size. But probably not something a 20 yearold should try from Mom's basement

Or, you could simply buy VIRT stock - check out their chart since mid_February - they benefit directly from higher volumes, wider bid/ask and volatility.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

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