Some Very Important Details When Constructing Your Own Fully Automated Trading Systems
The following article was taken from an exchange of emails with several clients. I felt this part of the dialog would be very helpful for our viewers. included below are some of the most important aspects to be aware of when constructing fully Automated Trading Systems.
There is no “Set it and forget it”
Trading System Platform Selection
Stock Options and/or Options on Futures
Does it mean the code you write is not expected to work for stock options?
Let’s take the TradeStation platform as our use-case.The automated trading system will run based on an open chart on the platform. Whatever ticker symbol is loaded onto the chart, that is the symbol the system will trade. So if we chart the symbol of AAPL, the system will buy and sell shares of AAPL. It will NOT be able to buy and sell options on AAPL. If you wanted the system to trade a single option contract, the OPRA code of that single option would need to be used as the ticker symbol for the chart. The chart would then display trading activity for that specific option contract. Any buy/sell signals generated on that chart would then be used to buy and sell that specific option contract. Therefore, an automated trading system on TradeStation will NOT be able to chart AAPL and then pick and choose from a list of options contracts and expirations to trade.
- Computer experiences loss of power and/or an interruption in its connection to the internet
- Computer crashes while the system is running
- The broker rejects an order
- The broker suspends or otherwise interrupts the data fee
- The exchange suspends trading in the selected financial instrument
User Intervention for Automated Trading Systems
- Shut down the automated trading system to prevent new orders being generated
- Cancel all open orders
- Flatten all existing positions
- Restart the trading system once you have a clear slate
Backtesting and Walk-Forward Analysis
Automated Trading Systems: Never a simple process
Conclusion
Automated Trading Systems can be a very useful tool for traders that are already profitable in their trading. It is dangerous to think that an automated trading system will make you profitable when you haven’t arrived at that point already. They can do far more damage than trading manually, so focus on being profitable first. Before getting started, you should carefully evaluate whether you can increase your current profitability through the use of an automated trading system. Remember that an automated trading system still requires that you be present, in front of the computer. Because at some point the excrement will hit the proverbial fan, this WILL eventually happen. So you must be there to pick up the pieces and reset everything to a clean slate before turning the system on again.
Recommended for further study
Thinkorswim Strategies Complex Stop Management
Strategies Winning Percent Versus Risk Reward
Hi Pete. I created a conditional exit script that exits and entry based on a very similar entry script. The entry triggers when the condition is true and exits when it is false. The problem I’m seeing is most times it works as planned but sometimes the exit triggers as soon as the entry triggers. Unsure why or how but seems Thinkorswim sees it as true and false at the same time. Even more confusing is I set this script in 2 different accounts and one day it triggered in both accounts and one account behaved as planned but the other account sold instantly. I can provide the script and conditions but unsure if you want me to paste them in here
This is far to complex to handle in the comments section of a video. And I suspect it’s also more complex than any solution I can provide via our Q&A Forum. I do offer professional services and you will find all of the details explained on the following webpage: https://www.hahn-tech.com/about/
That was kind of my thoughts too. I have been digging through and can’t figure out why it triggers both true and false occasionally but did look after watching your most recent video and my script has 71 lines of code so that may be the issue? I’m going to look into a different exit strategy to implement then backtest it. Thanks!
Ok, good luck to you. Be sure to check if your code uses recursive variables, as I demonstrated in my most recent video.
Does TOS allow an advanced order at a pre-set time, such as 30 minutes before or after an event? If yes, how to write a code? Event trading such as earnings day, FOMC meeting, etc. may need a “time-triggered” order.
The following link shows you all of the “events” which are available to the Thinkscript language: https://toslc.thinkorswim.com/center/reference/thinkScript/Functions/Corporate-Actions
Not that all of these are only accessible from the daily time frame or higher. There is nothing in the Thinkscript language that can work in the scenario you provided.
However you will find that any Conditional Order can be set to trigger at a specified date and time. This is completely independent of any code you place within the code editor of the Conditional Order.
I need help setting up a Thinkscript Scan in TOS for the following conditions:
High High for 40 days Low Low for 40 days
TOS people refused to help.
Please let me know how much it will cost.
Thanks
Sam Faruki
1. We do provide professional services and those details are explained on the following page of our site: https://www.hahn-tech.com/about/
2. You will find that we do not provide price quotes or estimates.
3. You will need to provide more details if/when you fill out that contact form at the bottom of the page to submit your custom project request.