♥ 0 |
Hi Pete, I watched your tutorial on how to do semi-auto orders on tos yesterday.
2. Also, I realized there is tos doesn’t support conditional orders based on ATR trailing stop, but it supports some custom studies. Is there any ways to find a similar study? Thanks a lot for your help! Daisy
Marked as spam
|
Private answer
New features have been enabled in Thinkorswim which provide fully automated round trip trades. Meaning we can now automate the entry and the exit and we can daisy-chain multiple stages within the order sequence so that multiple round trip trades can be accomplished automatically. In addition to this, we can save these orders as an order templates so they can be reused with very little effort. Check the following video for the full details: https://www.hahn-tech.com/thinkorswim-automated-round-trip-trades/
Marked as spam
|
|||
Private answer
Very good idea to include a screenshot with this. That helps to me everything perfectly clear. From your code I can immediately see a problem. Not sure if it’s the only problem. But to a programers eyes it jumps off the screen and smacks you in the face. You have ‘def LBB = ….’ and ‘def Midline = …..’ Then when you try to build your condition you place the LBB and Midline inside double quotes. Now I would not be the least bit surprised the conditional order wizard actually did that. So don’t panic if you didn’t intend that to happen. You simply need to remove the double quotes from those variable names.
That will correct the error: “Expected Double” The ATR trailing stop uses recursion and is not supported by conditional orders. There is no way to write a trailing stop like that without using recursion. So it is no possible to find a ‘similar study’ that will work with conditional orders. You had additional questions. This code is not for a Study, it is for a Strategy. Those are two completely different things. I see from your screenshot you are trying to add this code to a new custom Study. The AddOrder() functions will NOT work for a Study. You must create a new custom Strategy. Go back and review the video until you understand the difference and how to create a Strategy instead of a Study. Yes, each time you enter a conditional order it will have to be recreated. They do not auto-generate after execution. The code should create orders based on the criteria you listed.
Marked as spam
|
|||
Private answer
Hi Pete, Inspired by your think or swim strategy tutorial, I wrote a simple ATR strategy to backtest the data. (I understand I can’t do conditional orders based on ATR trailing stop.)
But when I checked the buy and sell signals on chart, I found a lot of slippages compared to do orders just based on ATR trailing stop. As you can see in my screenshot, orders based on ATR should be at white arrow, but it signal won’t pop until red arrow. Can I know if there is a way to fix it, so I can get correct backtesting report? Also, can I know have you tried to do automated trading on Tradestation based on ATR trailing and how does that works out? (I’m considering switching to tradestation, if tos doesn’t support ATRtrailing conditional order at all.) Thank you for your help!! Best regards, Daisy Marked as spam
|
Please log in to post questions.
Before I answer the question I need to correct the typo in your question’s title “Conditioner Order on TOS”. This will also break the current URL you are using to view this post. In order to access this post after I make that change, you will need to use the link provided in the email notification you receive after I post my answer. If you have not subscribe to this post, and are not receiving email notifications…. you will need to view your profile, and when viewing your profile click “questions”. There you will see a list of questions you have submitted. Your profile can be accessed only while you are logged on, by using the menu in the upper left sidebar “User Settings –> Profile”