How to set things up with thinkscript to do a buy and sell order

S

soary

Member
Hello all,
I learned a lot on this site and others and I am exited to finally have a thinkscript that I can use to buy and sell and I already tested it for my use. Today, I set up the ticker in Tos with an order and added the condition by using the little gear thingy on the far right, but the order did not fill so I'm trying to figure out why and I'm sharing what I did for your input in case you have a better way. At first, I tried to set the order to buy but then I would not be able to set the sell order at the same time before the buy order goes live. Next, I click on the "ask" and chose "buy with custom" so that I would have access to the brackets under "advance order" and could place multiple orders at the same time. Then, I changed advance order to "1st triggers all" so that I can place 3 orders; the buy and sell order with the condition for each one and stop order all at the same time and it still didn't get filled. As I watched my working order and price movement, it finally dawned on me that I probably need to change from limit order to market order to get it to fill since it would be difficult to know at what price the condition would trigger, and since there was only a 1cent difference between bid and ask it would have minimal slippage. Finally, by the time I worked out all of this the price had moved from my ideal entry point. How do you all enter a buiy and sell order in TOS using thinkscript? In thinkscripts code price is named as the close, high, low and etc so does this mean the setting to set up the order should be as a market order? Thanks in advance.

I set out to find out why and need your imput.rs
 
Last edited:
BenTen

BenTen

Administrative
Staff
VIP
Warehouse
This sounds like a problem for the official ToS team to answer. You may want to call or open a live chat with them.

As of now, there is no way to automatically execute your trades using a thinkScript strategy. We often do it just for backtesting. You still have to click buy and sell manually.
 
S

soary

Member
Thanks BenTen you are right but we can come close. As a follow up with TOS team it can be done by setting up a buy with custom OCO or sell with custom OCO order and you get 3 brackets, so then you enter your buy and sell orders with thinkscript conditions as I described previously and add your stop. If you already know how to use OCO you already know most of this, the difference is the addition of thinkscript conditions. In back testing the system creates new orders but like you said, in real it will not create new orders and will only work with the orders that are set up manually with or without conditions. It's done as a market order to get filled so I will use it with tight bid-ask spreads and the thinkscript conditions will rule the trades. I'm not a licensed financial professional and only trade for myself, so if anyone follows this practice it in paper trade first.
 
Last edited:

Top