Auto Trade (ALGO) in TOS

@Svanoy Yeah something was wrong with the script because at work today I noticed that I kept entering and exiting trades, it took alot more trades then it should have.
example.png
 
@aCuddlyTurtle Looks like that is what happened. My previous post should correct it. I am curious as to why the exit label is black though, it shouldn't be able to do that anymore.
 
Last edited:
@Svanoy I think I sent you that pic before I updated what you added. I know before with my original one that label would be black when I'm not In a trade with the renko bars. As I type this I added your latest update to the script and my tos algo is currently not in a trade and all the labels are colored so it may be fixed. Also I seen that you wanted another pic with the stoploss and plots on, I didn't edit your script at all that's just how it looks on renko charts.
 
Last edited:
@Svanoy Heres how it went today, It looks like it took 2 short trades today. it seems to get in 1 bar late though? idk if you set it up like this. it seems to be getting out on the right stop though. here's a picture. edit: actually after looking closer it looks like im getting in 1 candle late but shows it buying at the bottom the the previous candle so It appears to be working fine for now.

example_2.png
 
Last edited:
@aCuddlyTurtle yes, the trade entry plot created by the AddOrder is plotted 1 bar prior to the actual entry. I originally did this to allow exit of a trade on the same bar as entry(Not knowing you were using Renko). The price reference of that entry plot is adjusted to the open of the bar after the entry plot, where the trade is actually entered.

Looks like it is performing as intended.
 
@aCuddlyTurtle yes, the trade entry plot created by the AddOrder is plotted 1 bar prior to the actual entry. I originally did this to allow exit of a trade on the same bar as entry(Not knowing you were using Renko). The price reference of that entry plot is adjusted to the open of the bar after the entry plot, where the trade is actually entered.

Looks like it is performing as intended.
@Svanoy Yup so far so good, Thankyou
 
@Svanoy Hello, at the moment its 11:16am Friday night im currently in a trade that ahk entered earlier today. I was just looking at it and I noticed that the buy label is still green? Is this what you intended to happen? Will it stay green until the stoploss is hit maybe? I know the way I had it setup it would get a green buy label on one candle and then on the next go back to the other color. I'll try some on demand later and look at it, I just figured I would ask you first.

example.png
 
@aCuddlyTurtle yes, it is intended to happen. It will stay green (or red if shorting) until the target or stoploss is hit. Upon either being hit, it will turn back to the reset color. This happens at the same time the cyan label turns blue. I did it as a built in redundancy to make sure AHK doesn't trigger a buy (or sell) when already in a trade.
 
HI i just talked to a programer at THINKORSWIM this Week they R not allowed to help on Automating buy sell for stradegies .But it can be done . if the signal is generated it can be used . Opinion .
 
How much automation is possible in ThinkorSwim? To make my living as one who cannot possibly stare at charts of many markets in many timeframes day and night to spot the many profitable trading opportunities available every day, I must be able to program, test, prove, and implement automated trade setup detection AND execution. It's right there for the taking, and all I need is the tools and a little help with setup and testing. How much of this is the platform capable of delivering at this time, and how much will TD Ameritrade personnel assist? TradeStation provides automation, but I like the TOS platform and customer service much better than those of TradeStation.

How does one go about getting an API created?
Thanks in advance!
 
Last edited by a moderator:
TradeStation provides automation

FWIW, I started algo trading on TradeStation this year. TS automation works quite well. If you are serious about automated trading, in my opinion, the best thing you can do is learn to program for your preferred platform. That way you can run the setups you want based on market conditions instead of running the setups that someone else has programmed for their particular way of reading a chart.

Best wishes and happy trading.
 
Thank you for the vote of confidence in TS algo trading basis your experience.

Having used TS for a number of years, I would NOT recommend it for the situation you describe. Best wishes and please accept my sympathy in the loss of your mother!

Disclaimer: I'm just a stranger on the internet and thoroughly unqualified to give advice.
 
HI i just talked to a programer at THINKORSWIM this Week they R not allowed to help on Automating buy sell for stradegies .But it can be done . if the signal is generated it can be used . Opinion .
How much automation is possible in ThinkorSwim? To make my living as one who cannot possibly stare at charts of many markets in many timeframes day and night to spot the many profitable trading opportunities available every day, I must be able to program, test, prove, and implement automated trade setup detection AND execution. It's right there for the taking, and all I need is the tools and a little help with setup and testing. How much of this is the platform capable of delivering at this time, and how much will TD Ameritrade personnel assist? TradeStation provides automation, but I like the TOS platform and customer service much better than those of TradeStation.

How does one go about getting an API created?
Thanks in advance!

The ToS app does not support auto trading. No ToS Support will not provide assistance for auto-trading.
You can use an outside api to create one.
I moved your post here so you can read the 12 pages dedicated to algo trading.


We do not have a large API community. This is our one and only thread. Suggest you start with page 1.
These 12 pages cover what is available on this forum.
 
Last edited:
With TD commissions in the past being way to high to consider developing automated trading systems with I used a few years using Trade-stations Easy language then I spent over 5 years using Ninja trader.
If it is a auto-Trader that you want, you might want to check out the following Robotic Trading System. You can trade
both Stocks and crypto with gobabytrade.

FWIW.. GoBabyTrade is trading live. I have it and it made a couple of trades for me today.

But it's not a panacea, there are things I don't like about it. That's why I want to learn ThinkScript.

Actually I built a BUY Study and a SELL Study and use TOS to place a Sequential Conditional Order for MARA and Riot on a 15 minute time period and similar trades with GoBabyTrade.

At the end both had made money. My TOS trades did a little bit better. But the way they both work is different so it's to be expected. But I like the greater control I have with ThinkScript. But the ease of use is better with GoBabyTrade.
 
Last edited by a moderator:
Yes and No... While TOS doesn't have built in automated trading, per se, you can automate trade Entries and Exits using Conditional Orders... The caveat is that once initiated an Entry and Exit process is not repeated, meaning that you have to re-initiated the Conditional Order manually for every trade cycle... You are also limited in what criteria and studies you can include in your Conditional Orders...
https://usethinkscript.com/threads/sequential-order-strategy.12488/#post-107937

If wanting to BackTest this strategy, go to studies, click on strategy, click Create , post your code.
As @MerryDay said TOS does not AutoTrade only offers backtests of a strategy.
This particular strategy would trade often. Ninjatrader offers autotrading. I backtested on TOS last 5 day in NQ 3 MIN CHART it would have made 180 trades for a P/l of $6355, i tested on Ninjatrader backtest offered 138 trades at P/L of$2930. Just to give some perspective. The Ninjatrader is more accurate in terms of fills. It has a very low win rate about 28%.
If anyone here has a HotDamn strategy that has serious promise in TOS I have been getting better at converting if not too complex. This particular strategy was simple.

Check this out. It's simple and straight forward. I use a 15 minute candle.
Let me know how it compares with other strategies:
https://usethinkscript.com/threads/moving-average-setup-for-thinkorswim.12638/#post-107938
 
Last edited by a moderator:
If wanting to BackTest this strategy, go to studies, click on strategy, click Create , post your code.
As @MerryDay said TOS does not AutoTrade only offers backtests of a strategy.
This particular strategy would trade often. Ninjatrader offers autotrading. I backtested on TOS last 5 day in NQ 3 MIN CHART it would have made 180 trades for a P/l of $6355, i tested on Ninjatrader backtest offered 138 trades at P/L of$2930. Just to give some perspective. The Ninjatrader is more accurate in terms of fills. It has a very low win rate about 28%.
If anyone here has a HotDamn strategy that has serious promise in TOS I have been getting better at converting if not too complex. This particular strategy was simple.
Hello Irishgold, I use a HotDamn TOS strategy that has serious promise. I'd like to setup auto-trade.
 
Last edited by a moderator:
At this point, I am not developing any auto trade solutions for TOS, it is available if you research. The problem is really in people's expectation that their strategy, backtested in TOS , looks great but rarely does it implement well or consistently over time.
 
Last edited by a moderator:

Join useThinkScript to post your question to a community of 21,000+ developers and traders.

Similar threads

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
278 Online
Create Post

Similar threads

Similar threads

The Market Trading Game Changer

Join 2,500+ subscribers inside the useThinkScript VIP Membership Club
  • Exclusive indicators
  • Proven strategies & setups
  • Private Discord community
  • ‘Buy The Dip’ signal alerts
  • Exclusive members-only content
  • Add-ons and resources
  • 1 full year of unlimited support

Frequently Asked Questions

What is useThinkScript?

useThinkScript is the #1 community of stock market investors using indicators and other tools to power their trading strategies. Traders of all skill levels use our forums to learn about scripting and indicators, help each other, and discover new ways to gain an edge in the markets.

How do I get started?

We get it. Our forum can be intimidating, if not overwhelming. With thousands of topics, tens of thousands of posts, our community has created an incredibly deep knowledge base for stock traders. No one can ever exhaust every resource provided on our site.

If you are new, or just looking for guidance, here are some helpful links to get you started.

What are the benefits of VIP Membership?
VIP members get exclusive access to these proven and tested premium indicators: Buy the Dip, Advanced Market Moves 2.0, Take Profit, and Volatility Trading Range. In addition, VIP members get access to over 50 VIP-only custom indicators, add-ons, and strategies, private VIP-only forums, private Discord channel to discuss trades and strategies in real-time, customer support, trade alerts, and much more. Learn all about VIP membership here.
How can I access the premium indicators?
To access the premium indicators, which are plug and play ready, sign up for VIP membership here.
Back
Top