NexusFi: Find Your Edge


Home Menu

 





AddOrder(): Does this dang thing work?


Discussion in ThinkOrSwim

Updated
      Top Posters
    1. looks_one WattMan with 3 posts (1 thanks)
    2. looks_two aventeren with 2 posts (0 thanks)
    3. looks_3 RedK with 1 posts (2 thanks)
    4. looks_4 Vacationer with 1 posts (0 thanks)
    1. trending_up 15,978 views
    2. thumb_up 4 thanks given
    3. group 5 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

AddOrder(): Does this dang thing work?

  #1 (permalink)
 
aventeren's Avatar
 aventeren 
Bellingham, WA USA
 
Experience: Beginner
Platform: NT
Broker: Mirus (Broker), Continuum (Data), Dorman (Clearing)
Trading: Futures
Posts: 202 since Mar 2013
Thanks Given: 428
Thanks Received: 202

Howdy all--

I was curious if anyone has had any luck using the AddOrder() thinkScript within a custom study or strategy. The AddOrder() is discussed on the TOS platform here: https://demo.thinkorswim.com/manual/dark/thinkscript/reference/Functions/Others/AddOrder.html.

I built a fairly simply custom study that contained an indicator that I am using to enter and exits my trades. I'm finding that being quick is important (I'm trading the 6E), so I thought at a minimum I would use AddOrder() to enter the trade, and then I would manually place my bracket stops once the position was entered into. However, I was unsuccessful in my attempt to get AddOrder() to work.

I tried chatting with TOS this AM about this, and they basically went into vapor lock and just left the chat, which left me perplexed.

A little research on TOS's website resulted in this: Using Strategies ? Resource Center, in which the key phrase is "Note that currently you cannot send real orders using strategies."

I then did a little more research, and I found that you can use "Alerts" for order entry and exits, but you can only use time-based aggregation periods, and given that I am use Range Charts and not Time Charts, I don't think using the Alerts tab will work for me.

Is it actually true that you cannot place orders using TOS thinkScript and that the only way to enter or exit an order is by manually clicking through the order process?

My goal is to paper trade trade entries and exits based on a simple indicator moving into and out of a condition (ie, on or off). Is anyone currently successfully using "algorithmic" order entry and exits based on a user defined study or strategy?

Thanks!

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
What broker to use for trading palladium futures
Commodities
REcommedations for programming help
Sierra Chart
 
  #2 (permalink)
 
RedK's Avatar
 RedK 
Dubai, UAE
 
Experience: Intermediate
Platform: TOS, TradeStation
Broker: OX, TradeStation
Trading: Stocks & Basic Options
Posts: 171 since May 2012
Thanks Given: 44
Thanks Received: 145

I believe automated trading was stripped away from ToS a while back.. you can use the AddOrder() to backtest your custom strategies (based on the built-in studies or custom studies that you create or download and add to your ToS) .. the way it works in summary, you modify the study to create the entry/exits "orders" (best way is to look at the existing strategies in ToS and modify your studies similarly), then couple the studies into a strategy (have an entry and an exit pair), then right-click and generate the back-testing report and see how your strategy works ...

I did this few times and it does work.. but don't use it all that frequently .. does this help?
K,

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #3 (permalink)
 
aventeren's Avatar
 aventeren 
Bellingham, WA USA
 
Experience: Beginner
Platform: NT
Broker: Mirus (Broker), Continuum (Data), Dorman (Clearing)
Trading: Futures
Posts: 202 since Mar 2013
Thanks Given: 428
Thanks Received: 202



RedK View Post
I believe automated trading was stripped away from ToS a while back.. you can use the AddOrder() to backtest your custom strategies (based on the built-in studies or custom studies that you create or download and add to your ToS) .. the way it works in summary, you modify the study to create the entry/exits "orders" (best way is to look at the existing strategies in ToS and modify your studies similarly), then couple the studies into a strategy (have an entry and an exit pair), then right-click and generate the back-testing report and see how your strategy works ...

I did this few times and it does work.. but don't use it all that frequently .. does this help?
K,

Bummer; just as I suspected. Thanks for your quick reply, RedK!

Have a great weekend!

Started this thread Reply With Quote
  #4 (permalink)
 
Massive l's Avatar
 Massive l 
OR/USA
Legendary /NQ Trader
 
Experience: None
Posts: 2,129 since Mar 2011
Thanks Given: 1,859
Thanks Received: 5,106

@aventeren Yep and 3 years later still nothing :/ I have some great strategies and it would be nice to have them automatically triggered through 6 instruments. Manual trading should be a thing of the past. What are you using today?

Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #5 (permalink)
 
WattMan's Avatar
 WattMan 
New Brunswick, NJ, USA
 
Experience: Intermediate
Platform: NT8, ToS
Broker: IBKR, TDA, NT
Trading: Stocks (B&H), Futures (started daytrading), Forex (maybe someday)
Posts: 16 since Dec 2014
Thanks Given: 40
Thanks Received: 2

Is there any way to get trades automatically triggered using ToS?

Reply With Quote
Thanked by:
  #6 (permalink)
 
WattMan's Avatar
 WattMan 
New Brunswick, NJ, USA
 
Experience: Intermediate
Platform: NT8, ToS
Broker: IBKR, TDA, NT
Trading: Stocks (B&H), Futures (started daytrading), Forex (maybe someday)
Posts: 16 since Dec 2014
Thanks Given: 40
Thanks Received: 2


WattMan View Post
Is there any way to get trades automatically triggered using ToS?

I did continue my research and found some helpful pointers on the net (I am yet to see how they can apply to my case). One of them comes from a ToS centered alternate website. In a nutshell, within ToS users can create Conditional Orders which at creation point are GTC (unless you want to re-create the same order daily!) and IMHO be be made part of simple OCO or larger Bracket orders (disclaimer: all this is pending testing!). Why I liked this particular pointer was even though there is programming, ToS offers a UI driven Condition Wizard which can be seamlessly be used with the thinkScript Editor (they are both side by side) and all you need to do is copy the final thinkScript code generated to add as part of the condition definition. When such orders are placed through ToS, the submitted order status shows "Wait Cond." and before accepting such order ToS will display a couple of warnings and disclaimers around such orders. Till I saw this website and video, I was not aware such a capability resided within ToS which seems pretty powerful to me as of my current understanding...

For anyone interested, please note that as of writing this post, I am fairly convinced on the approach and framework, but have done no testing whatsoever. I do intend to post an update when I have conclusive observations to share with this group.

Admin / BigMike - I am unsure if I can post external website or YouTube video links here - please let me know

Till then interested users feel free to PM me. I typically get to this forum late evenings EST timezone...

Reply With Quote
  #7 (permalink)
 
WattMan's Avatar
 WattMan 
New Brunswick, NJ, USA
 
Experience: Intermediate
Platform: NT8, ToS
Broker: IBKR, TDA, NT
Trading: Stocks (B&H), Futures (started daytrading), Forex (maybe someday)
Posts: 16 since Dec 2014
Thanks Given: 40
Thanks Received: 2


WattMan View Post

Admin / BigMike - I am unsure if I can post external website or YouTube video links here - please let me know

Till then interested users feel free to PM me. I typically get to this forum late evenings EST timezone...

Since I didn't any objections from anyone, here is the link I was referring to in my response above. My testing is still pending but hope this link & video helps:

https://www.hahn-tech.com/thinkorswim-autotrade-almost/

Reply With Quote
  #8 (permalink)
 Vacationer 
Sarasota, Florida
 
Experience: Intermediate
Platform: TOS, IB, TS
Broker: TD Ameritrade, IB, TS
Trading: ES, NQ, YM, RTY
Posts: 27 since Jan 2018
Thanks Given: 38
Thanks Received: 13

I had spent a lot of time checking this out, and saw the link on you tube as well. It is a good video to learn from, but keep in mind the risks of that, which are easy to find if you paper trade whatever you are trying to do.

With execution always happening on the next bar, hard to get much done intraday. And if you use GTC for overnight orders then you will actually have high slippage due to no liquidity.

The choices for order sequencing, triggering are very limited, and the whole area of order entry is very small to monitor orders on several securities.

Good luck.

Reply With Quote
  #9 (permalink)
epete
Blaine, MN / USA
 
Posts: 1 since Mar 2015
Thanks Given: 0
Thanks Received: 0

Were you ever able to resolve sending a real order using AddOrder?

Reply With Quote




Last Updated on November 30, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts