Auto Trade (ALGO) in TOS

With TD commissions in the past being way to high to consider developing automated trading systems with I used a few years using Trade-stations Easy language then I spent over 5 years using Ninja trader. One thing I discovered after creating and testing , back-testing , walk-forward testing , mont-carlo testing and many others types of testing was that commissions play a significant role in automated strategies. Is anyone here trading completely automated I was wondering. Because I call TD Ameritrade today and asked them about algo trading and if they still support it and I could tell I was talking to a seasoned service person and even they had to ask around lol. With the new zero commissions it is very tempting to knock the dust off a few off my Ninja algos that took high frequency trades but were not viable due to high commissions and convert them to think script. Ninjatrader is about 10000000000000000 light years ahead of any other trading and indicator development system but unfortunatly when in the past I connected it TD Ameritrade via the API it was getting nightmarish executions on orders so I had to end that.
My question is is there anyone here that hands off algo trade? or is everyone just testing their trading ideas to enter manually?
 
@TexasTraderWayne welcome to the forum. I done both and can share some feedback and approaches. We should connect in the near future and discuss. if you have a specific trading plan in mind can see if there is a way to port it or semi-automate components of it..

Best!
 
Last edited:
I am not sure but I think you use your own software or someone else's software to send your buy and sell orders through the API to TOS. I don't believe Thinkscript is involved. I know you cannot do automated trades in TOS or with thinkscript on the TOS platform. And you cannot trade futures through the API.
This is from TOS support: "I have double checked this and it looks as though the products tradable through API programs are currently, stocks, etfs, options and index options. Unfortunately futures would not be available at this time. Sorry for any inconvenience."
 
I am not sure but I think you use your own software or someone else's software to send your buy and sell orders through the API to TOS. I don't believe Thinkscript is involved. I know you cannot do automated trades in TOS or with thinkscript on the TOS platform. And you cannot trade futures through the API.
This is from TOS support: "I have double checked this and it looks as though the products tradable through API programs are currently, stocks, etfs, options and index options. Unfortunately futures would not be available at this time. Sorry for any inconvenience."
NOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO.
I have a consistent strategy on thinkorswim and was banking on trading futures. That's a real bummer, thanks for the info tho.
 
Autotrading on the ThinkOrSwim Platform
Hey there - I am new to TOS and assume from this thread that there isn't a native way in thinkScript to automated strategies. Is this a valid assumption?
 
Last edited by a moderator:
Hey there - I am new to TOS and assume from this thread that there isn't a native way in thinkScript to automated strategies. Is this a valid assumption?
Yes and No... While TOS doesn't have built in automated trading, per se, you can automate trade Entries and Exits using Conditional Orders... The caveat is that once initiated an Entry and Exit process is not repeated, meaning that you have to re-initiated the Conditional Order manually for every trade cycle... You are also limited in what criteria and studies you can include in your Conditional Orders...
 
Thanks for the reply @rad14733 .
A couple of follow up questions:

Do the conditional orders work with custom studies?
Has TOS ever indicated having the capability to send orders from a dynamic scan in their roadmap?
 
Thanks for the reply @rad14733 .
A couple of follow up questions:

Do the conditional orders work with custom studies?
Has TOS ever indicated having the capability to send orders from a dynamic scan in their roadmap?
You can only select TOS licensed studies... Complex studies with aggregation usually won't work... You can use custom study code but it needs to be written in the conditional order code section rather than being referenced and there are no guarantees that it will work... I spent a couple days with online support through TOS trying to get some code working and even support staff couldn't definitively pin down issues, most likely aggregation related, so I dropped the auto-trade idea I was working on and haven't made additional attempts to date...

I am not aware of any intentions by TD Ameritrade to head deeper into the auto-trading realm... They do, however, allow you to link up with third party auto-trading systems... There is a section on the TDA site that addresses this feature...
 
Do you know of any brokers that allow auto-trading?
TradingView, NinjaTrader, Interactive Brokers, MetaTrader, and more... However, I cannot stress strongly enough how cautious one should be about auto-trading because you could potentially blow up your trade account in hours, minutes, or even seconds if there is a problem with your trade logic... Also remember that even with no commissions you still incur exchange fees for every trade and those fees can add up quickly... Use due diligence before venturing into the auto-trading realm...
 
A company from the U.K. (Altredo.com) claims to have an auto-trading robot for TOS.
I read a previous post herein that stated TOS doesn't allow auto-trading....

How would Altredo get around that issue ?
Regards,
Jim
 
A company from the U.K. (Altredo.com) claims to have an auto-trading robot for TOS.
I read a previous post herein that stated TOS doesn't allow auto-trading....

How would Altredo get around that issue ?
Regards,
Jim
Altredo IS a trading platform in and of itself... It can be configured to work with several Brokers including TOS, NinjaTrader, Interactive Brokers, MetaTrader, etc via API's... So Altredo is the charting and trading software but it ties into various Brokerages for executions of user account trades...
 
Without using the buy and sell buttons on ThinkOrSwim, is it possible to programmatically execute realtime buy and sell orders with ThinkScript code?
 
@Picard No, you would need to use an external software/app or build your own using ThinkorSwim API.
 
Auto Trade in TOS

can some one please explain does tos buy and sell automatically with think script,

i am using this code

i get only plots but it doent buy or sell

input tradeSize = 1;
def signal = MovAvgExponential("length" = 3)."AvgExp" crosses above MovAvgExponential("length" = 8)."AvgExp";
addOrder(OrderType.BUY_TO_OPEN, signal, open[-1], tradeSize, Color.CYAN, Color.CYAN);
def exit = MovAvgExponential("length" = 3)."AvgExp" crosses below MovAvgExponential("length" = 8)."AvgExp";
addOrder(OrderType.SELL_TO_CLOSE, exit, open[-1], tradeSize, Color.MAGENTA, Color.MAGENTA);


can someone please help. how to auto trade in tos with this code?
if possible a script to auto trade.

how does it buy and sell?
 
Last edited:
Last edited:
TD Ameritrade gives us a great product we can use to back test strategies,
but when you find one which seems interesting there is no way to auto trade or even receive system alerts when a "setup" appears.
Thanks for letting us all prove to our self , the idea works - just not here. ERRRR
 
Last edited by a moderator:
@TrainDoodle,
The simple elimination of the Addorder lines will turn your TOS strategy into a study that is executable.​
TOS and the other major trading platforms whose predominant end-use is providing strong charting analysis do not have robust algo-trading modules. Some members here use dual-platforms. Using a charting platform such as TOS for analysis and then actual trade on another platform that better meets their needs.​
 
If wanting to BackTest this strategy, go to studies, click on strategy, click Create , post your code.
As @MerryDay said TOS does not AutoTrade only offers backtests of a strategy.
This particular strategy would trade often. Ninjatrader offers autotrading. I backtested on TOS last 5 day in NQ 3 MIN CHART it would have made 180 trades for a P/l of $6355, i tested on Ninjatrader backtest offered 138 trades at P/L of$2930. Just to give some perspective. The Ninjatrader is more accurate in terms of fills. It has a very low win rate about 28%.
If anyone here has a HotDamn strategy that has serious promise in TOS I have been getting better at converting if not too complex. This particular strategy was simple.
 

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