ThinkOrSwim Auto Trading Bot

T

trader54

New member
Hello Friends, Here is thinkorswim auto trading bot i have developed. You can execute any thinkscript strategy in real account and execute live trades. This is NOT same as adding manual orders in thinkorswim based on custom study. This is a full automated trading based on the signal received from thinkscript strategy.

The strategy being used by this program must be non-repaiting strategy. Otherwise it would not give the same result as backtest.

This demo is recorded using the simple strategy for demo purpose only. This demo strategy should not be used for real trading.

If anyone of you have any non-repaiting strategy with good backtesting result, you can provide to test with this trading bot. Looking forward to work with any thinkscript experts.
 
Last edited by a moderator:
M

Messmeter

New member
VIP
Looks like you wrote some java program using api. Not interested in strategy but interested in the auto trading tool. Could you please provide more details?
 
T

trader54

New member
@trader54 I'd be interested however the details are vague. Could you further explain your creation?
Hi @Alex , I have not provided any implementation details in this that's why it looks vague. This is just a demo of how it works. I am working on another demo which will give you more details. It uses thinkorswim APIs for placing orders and few other technical stuffs for fetching tos strategy results. I'm looking for non-repainting strategy with good backtesting result for bot testing. Thanks.
 
S

sindhu19

New member
2019 Donor
Interesting, looking forward to more details.
 
A

adii800

Member
Wow, very interesting stuff and I have been looking for something like this that would actually execute my orders on TOS for a long while but to no avail. I have my own thinkorswim strategies that perform well and have just been looking for something that executes strategy generated order, very excited for further details.

Two questions: What do you mean by "non repainting strategy"?

&
Does this work on futures (such as /ES), if so I have some strategies that work great on smaller time frame charts (not just futures though)?

Sign me up for experimenting w your app, I have been looking for something like this for a while and would like to get started asap!
Thx
 
Last edited:
G

GilSH

New member
This is very interesting. I was looking for something like that for a long time.
Did you use the TD API for this or are you “piggybacking” the TOS platform?
If it’s possible I would like to see your code for this.
 
I

irishgold

Member
Looks to be a tdameritrade API Java client . One modification to your basic MACD might be Diff crosses above 0 for the Buy and diff crosses below 0 for the close, you might also add supertrend signal see Ben Posting: Mobius Supertrend. Sign me up for experimenting with your app. I was looking recently at Sierra Chart for automating but this might be simpler since TOS is so easy to code. Also you might try trading /ES or NQ contracts using a Timeframe of Range/Tick/3(ticks) of course in the paper account.
 
C

codydog

Active member
You may want to ask tos what their minimum balances are for access to their api, imo
 
D

Dhjesus

New member
VIP
Hi there, thank you for putting it together. I will be willing to try your auto trading bot. Please let me know.
 
I

irishgold

Member
@trader54 On TD Ameritrade developer site it states the API does not work with Paper Money account, I see you have it in dropdown list.
I found a github site that has some code already put together TD Ameritrade API Java, I downloaded it installed JAVA JDK and Maven and Eclipse. Right now I am having trouble getting the access token from TD Ameritrade after creating an app on their developer site. I think I could code this once I get into it. I guess the real trick will be taken complex strategies and converting to code. Do you have to create the order fulfillment in the JAVA or can it call an existing strategy in your TOS account?
 
T

trader54

New member
@trader54 On TD Ameritrade developer site it states the API does not work with Paper Money account, I see you have it in dropdown list.
I found a github site that has some code already put together TD Ameritrade API Java, I downloaded it installed JAVA JDK and Maven and Eclipse. Right now I am having trouble getting the access token from TD Ameritrade after creating an app on their developer site. I think I could code this once I get into it. I guess the real trick will be taken complex strategies and converting to code. Do you have to create the order fulfillment in the JAVA or can it call an existing strategy in your TOS account?

Hi @irishgold , TD APIs don't work with paper trading account. I added in the dropdown for testing. For Paper trading it is not calling TD APIs but it is just mocking those APIs. For live trading, you don't need to convert your thinkscript strategy to java or anything else. Thinkscript strategies works as is in this. Apart from TD APIs many other technology stuffs are integrated in this bot. Thanks.
 
T

trader54

New member
You may want to ask tos what their minimum balances are for access to their api, imo

Hi @codydog , I am not aware of any minimum balance requirements for using TOS APIs. Will check with TD and let you know. Thanks.
 
I

irishgold

Member
Hi @irishgold , TD APIs don't work with paper trading account. I added in the dropdown for testing. For Paper trading it is not calling TD APIs but it is just mocking those APIs. For live trading, you don't need to convert your thinkscript strategy to java or anything else. Thinkscript strategies works as is in this. Apart from TD APIs many other technology stuffs are integrated in this bot. Thanks.
That is excellent news and I can concentrate on making a reliable strategy and will share whatever I find works. Right now the Supertrend plus MACD is looking pretty good and the CSA study has promise once I get it to be consistent. Looking forward to when you can offer this bot to us. Thanks for your reply.
 
T

trader54

New member
Hi @codydog , I am not aware of any minimum balance requirements for using TOS APIs. Will check with TD and let you know. Thanks.

I just confirmed with TD that there is no fees or minimum balance requirement for using APIs. However to make more than 3 trades per week you should maintain minimum of 25K portfolio value. Thanks.
 
A

Art

Member
I just confirmed with TD that there is no fees or minimum balance requirement for using APIs. However to make more than 3 trades per week you should maintain minimum of 25K portfolio value. Thanks.

It's not 3 trades per week, it's 3 DAY trades per week
 
G

GilSH

New member
I would love to try this. Please let me know if this is possibl.
 

Similar threads

Top