We cover 8 different trade scenarios in this tutorial. Here are video timestamps that might come in handy: 0:01 - Automated Trading Intro 1:25 - Who We Are 3:54 - What Will We Discuss in this Tutorial 5:42 - Why Automated Trading? 8:57 - What is the Automated Trading Triggers Window? 10:55 - 8 Trigger Scenarios That We Will Build 15:05 - Scenario 1: Nightly Trending List 18:47 - Scenario 2: Iron Condor When in Consolidation 23:56 - Scenario 3: Automatic Covered Call for Income at Fib Extensions 27:40 - Scenario 4: Buy Put When RSI Shows Bearish Breakout Signals 32:01 - Scenario 5: Buy Stock on Pullbackto 34 EMA 36:34 - Scenario 6: Sell Position When Squeeze Loses Momentum 39:37 - Scenario 7: Layering on Multiple Indicators 44:55 - Scenario 8a: Buy on Implied Volatility Pullbacks (Entry) 47:01 - Scenario 8b: Sell When Trend Breaks 53:04 - What Else Can I Do? Hope you enjoy this tutorial!
@mikeferrato35532 жыл бұрын
Thank you for the amazing content. I have a question about tying your limit order to the ask/bid. Can you explain how thats different from a market order?
@mikedonline2179 Жыл бұрын
Thanks for the great video! One point I noticed at 22:18 - the Ask/Bid, according to the manual is "... either the bid or the ask price plus the offset specified as an absolute value. The system automatically chooses the ask price for Buy orders and the bid price for Sell orders." I believe you want to select MARK which is the mid-point and you can modify the offset amount.
@TOSIndicators Жыл бұрын
Thanks for the tip! Appreciate it.
@marketshareclub74642 жыл бұрын
Great content !! Thanks for sharing such a great tutorial and for explaining in simple terms how everything works. We need more traders and contributors like you ! I will look at the rest of the content in your channel, it looks fantastic.
@samdoral49272 жыл бұрын
Great video on Advanced scripting on ThinkOrSwim
@samdoral49272 жыл бұрын
Thanks you, Loved it, Have a scenario & wanted to know if I can manage by scripting. I've two OCO orders one for long & the other is for Short on the same stock & both have entry/exit & stop. Is there was I can connect both where if the long one is executed, short will be cancelled and vice-versa. Incase you have a script available already appreciate if you can share pls. Thanks in advance.
@sujaydutta3 жыл бұрын
Really nice tutorial!
@hakenly4 жыл бұрын
This is awesome exactly what I was looking for, very detail work and explanations
@TOSIndicators4 жыл бұрын
Glad you liked it!
@hakenly4 жыл бұрын
TOS Indicators Instead of having a line that moves up when the signal occurs, how would I change it to show just 1 arrow when the signal occurs?
@TOSIndicators4 жыл бұрын
You could use boolean arrows to change the plot. Documentation here: tlc.thinkorswim.com/center/reference/thinkScript/Constants/PaintingStrategy/PaintingStrategy-BOOLEAN-ARROW-UP
@hakenly4 жыл бұрын
@@TOSIndicators Thanks I've tried that already, but it can draw a long continuous row of arrows when the signal is true for several bars in a row. I want to just have only 1 arrow drawn when the 1st signal is true and if the next several bars are also true not to continue drawing the arrows until the signal ends.
@TOSIndicators4 жыл бұрын
Right. You'll need to factor that into your boolean condition, checking if the signal was true on the current bar, and not the previous bar.
@garthwilliams80692 жыл бұрын
WOW. Great vid. Those ideas for triggers really make you think about finding and or setting up positions in a truly customized fashion.
@TOSIndicators2 жыл бұрын
Agreed!
@Randall19063 жыл бұрын
Outstanding; thank you!
@TOSIndicators3 жыл бұрын
Thanks Randall! Appreciate it.
@aniljadhav94084 жыл бұрын
Pretty well articulated.
@TOSIndicators4 жыл бұрын
Thanks Anil!
@ninoachay5739 Жыл бұрын
Is there a way to input a repeat everytime those conditions happen and run it on the on-demand for backtesting?
@KPSoundCo2 жыл бұрын
How about triggers based off premarket levels on options with different strike alerts triggered off the pre market levels
@martyfrancom71482 жыл бұрын
I have figure out how to create a custom BUY/SELL using the MACD-Histogram CrossOver Study. I would like to be able to do the same with the HA CrossOver Study. There doesn't seem to be any such study. Can you be of any assistance in creating a HeikenAshi -CrossOver Study ?
@kasusista33173 жыл бұрын
This is fantastic. Thank you.
@TOSIndicators3 жыл бұрын
Thanks Kasu! Appreciate it.
@brentg2452 жыл бұрын
Is there anyway to automate the share size or number of contracts? For example, if I can write a script to determine my stop and base my number of shares to purchase off of that can that be incorporated? What about "looping" the order to hit some total dollar amount? Really just trying to automate number of shares based on using a def and simple math, but first glance it doesn't look possible
@stephenhobbs9483 жыл бұрын
thanks! Very valuable.
@TOSIndicators3 жыл бұрын
Thanks Stephen! Glad you found the tutorial useful.
@xueyuan14 жыл бұрын
awesome post! Thanks
@TOSIndicators4 жыл бұрын
Thanks David - glad you liked it!
@fabianflores-jasso40574 жыл бұрын
Yet another GREAT video!! Perhaps you can help me. I’m trying to automate a bullish and bearish entries/exits signal for the same stock. But I am confused about how the platform recognizes the exit bullish signal from the bearish entry signals. Also, I am not sure how to enter them in the Trade tool, should they be added separate, in order words the bullish entry/exit from the bearish entry/exits? Thanks again!!
@TOSIndicators4 жыл бұрын
Hi Fabian - based on your strategy and the code, the bullish and bearish signals would be "plot" variables, which you could then reference via exampleFunction().bullishSignal. Depending on the complexity of your code, TOS may give you a "complex error" if you try to combine too many variables/calculation (with both bullish and bearish). If you face that error, then you can trim down your code... as necessary :-).
@outlaw40164 жыл бұрын
This is awesome... so it automatically executes the buy and sell orders? So you can just run one of these and go AFK?
@TOSIndicators4 жыл бұрын
In theory, yes... but does require you to re-submit the order every time (incl. the sell-side scripts).
@iameladlevi4 жыл бұрын
TOS Indicators Thanks! So there is no easy build in was to get strategies running / demo backtested using TOS? E.g. macd strategy on SPY Without me defending it after every trade? Much appreciated your work!
@Dori_1111 Жыл бұрын
Excellent video. It's a shame there is no option for 'tick' timeframe so I could use this for my scalping strategy. The minimum is 1 min.
@seek3n2 жыл бұрын
is it possible to set a percentage in between the moving average? Let say all three must be within 0.01% to 5% so it really makes it stacked
@TOSIndicators2 жыл бұрын
Hi there - yes, that should be possible, though would need to be a custom script.
@mistletoe91 Жыл бұрын
But how to do risk management ? E.g. The alog should calculate quantity based on risk $$$. So how to do that ?
@aliasirealestate10533 жыл бұрын
As usual, amazing informative clip. 1. I think for the first scenario, the main order should be submitted as a “STOPLIMIT” order. Otherwise, if the order is submitted the way it is, it will get an immediate fill since the LIMIT price is over “ASK” price. I guess the whole intention here is buying the stock if it is building up momentum and shooting past a higher price.
@caitlynbli3 жыл бұрын
in the code cross above set it already.
@naweedsyed41524 жыл бұрын
Amazing video thank you 👍
@TOSIndicators4 жыл бұрын
Thanks Naweed! Glad you liked it.
@Forgottennowfound4 жыл бұрын
I do not have the ability to have a study trigger an action on the on demand side of TOS? That kinda sucks how do you back test?
@TOSIndicators4 жыл бұрын
You can backtest in ThinkOrSwim using the "Strategies" functionality, and write your own thinkScript to give you some basic reporting. An additional benefit with that is you can leverage the same backtest thinkScript code in the Automated Triggers tab (assuming it passes the complex equation test).
@SuperDanny10164 жыл бұрын
OnDemand is not the same as PaperMoney. You'd need to log into to the PaperMoney account in order to run the studies since OnDemand doesn't support ThinkScript.
@SamAgro20243 жыл бұрын
Great Video. is it possible to create a custom template with a condition so that my sell orders will cancel automatically 5 mins before market close. Right now, i can only specify a date and time and that date becomes past if i use the template for a new order in the future.
@TOSIndicators3 жыл бұрын
You might be able to get away with using the "SecondsTillTime" function to link it to 5 mins before the market closes, instead of specifying a date/time. However, once the order gets triggered for the first time, you will need to re-submit for future orders.
@dumbcat3 жыл бұрын
can you save these and attach them to hotkeys?
@guangyang38404 жыл бұрын
is it possible to trade continuously. For example if fast Average line cross above (below) the slow average line, thinkscript can do automatically and continuously? Or u have some alternative ways. Thanks in advance.
@TOSIndicators4 жыл бұрын
Not that I'm aware of - each new entry and exit order needs to be re-submitted in TOS.
@cgsews2 жыл бұрын
You can do up to 8 legs for continuous buying and selling which would be 4 buys and 4 sales on the same trade.
@robertskrob7653 жыл бұрын
Awesome! Any way we can use custom thinkscript code that’s not based on an indicator for placing orders? Like the ATR Trailing stop? That’s built into charts but not the order entry script selection, May need to define signal? Thoughts?
@TOSIndicators3 жыл бұрын
Hi Robert - I think you could use the "ATRTrailingStop()" study, which is built inside of ThinkOrSwim, and use that to link (and test) to a trigger condition. Not sure if it would work, but it's a good starting spot, and use that code to test / tweak. You also have access to the source code inside of TOS, if you'd like to define the signal yourself.
@robertskrob7653 жыл бұрын
Thank you! I had never seen the “define signal” before. That’s huge if I can get it to work. This would mean every study, both default and customized is fair game for an entrance or exit. Very impressive!
@naeemsemerkant88934 жыл бұрын
Where do you recommend back testing your trading strategies and running them live? TOS does not seem to have very comprehensive back test reports and the automated trading is limited
@TOSIndicators4 жыл бұрын
If you're familiar with Python, Quantopian offers a fairly robust platform that is powerful enough to backtest with nuances that you'd need to truly replicate an automated-trading bot (i.e. drawdown, account ratios). The downside is their platform integrates with Robinhood, but you may consider using it purely to backtest your strategies as well.
@jorgensoby53224 жыл бұрын
You can put on floating pnl with strategies on your chart go to studies and put on a strategy
@ygtcbee233 жыл бұрын
@@TOSIndicators, unfortunately, Quantopian has pivoted away from the crowdsourced hedgefund model. they no longer offer the tools to public as they once did
@deemo164 жыл бұрын
ibridgepy can now be used to automate TD accounts. Also (I haven't watched this entire video, but perhaps this was mentioned), you can't use reversion programming to trigger automated events. This prevents most complex trading concepts. For instance, you can't use VWAP to trigger trades (please correct me if that has been fixed)! When you attempt to calculate things like VWAP it errors.
@coachcleats134 жыл бұрын
perfect!!
@hamelbus4 жыл бұрын
Hi, I tend to trade using range bars. Is there any way to automate trades on thinkorswim using range bars instead of time-based aggregation? When setting up the order condition, it seems like only time-based is available (ie. day, min, month etc..). Thanks!
@TOSIndicators4 жыл бұрын
Hi there - I'm not aware of a way to go from time-based bars to range-based ones, for the scripting conditions. Sorry!
@tmtrader173 жыл бұрын
Do you know if it’s possible to use other time frames that aren’t given for the order conditions?
@TOSIndicators3 жыл бұрын
Hi Teddy - I don't believe that's possible.
@naina92833 жыл бұрын
Are secondary aggregations allowed for the buy/sell conditions?
@TOSIndicators3 жыл бұрын
I don't believe so.
@silverback2836 ай бұрын
Code for TTM losing momentum does not seem to work. Is there any update?
@אלילוזן4 жыл бұрын
Thank you so much for the detailed and beautiful video, I wanted to ask , Sample buying conditions , buy only once, and the condition ends, Can a condition be repeated over and over again, For example: if the price went up in cents, buy , And then every cent that costs the system will automatically buy again and again?
@TOSIndicators4 жыл бұрын
Not that I'm aware of - the thinkScript needs to be copy/pasted each time, and the trigger condition "re-submitted."
@JE-md6gd3 жыл бұрын
Can you semi-automate Futures trade? Thanks
@TOSIndicators3 жыл бұрын
I believe so, but I would test thoroughly in paper-trading esp. with futures. The benefit of stocks is being able to trade with as little as 1 share in live money, vs. your lowest risk form to test in futures would be the micros.
@cgsews2 жыл бұрын
yes, if you need help, call their support line.
@robbertorizalino36484 жыл бұрын
Have you have a trial, or we tried it lose or win. ? Can it be applied in option trading.
@TOSIndicators4 жыл бұрын
The tutorial covers a few different scenarios that you can try to apply, including options trading.
@jeepjr4 жыл бұрын
would have how to make a grid with leverage
@Stealthy_Sloth Жыл бұрын
How can we paper trade options on TOS?
@TOSIndicators Жыл бұрын
Just need a TOS account switched to Paper Trading mode and you should be able to trade via the options chain on the Trade tab.
@tsteins15794 жыл бұрын
Do you see it as a possibility to have an algorithm that swings for you depending on SMA's? Ex: Purchase when the price opens above the 50SMA and sell when the price closes below the 50SMA.
@TOSIndicators4 жыл бұрын
That should be possible - the 50 SMA should most likely not trigger the Complex Exception error.
@jimmyvo40214 жыл бұрын
Hello, is there a way to sell a indicator if one comes before the other such as: Sell if 50 SMA < 200 SMA or RSI > 70 (which ever comes first)? Or would you just make 2 sell orders?
@TOSIndicators4 жыл бұрын
You could use the "or" condition, with each indicator set in its own boolean condition. I would thoroughly test this in Paper Money, though.
@mattd77704 жыл бұрын
Great video. Thank you. But your right, there are some real limitations. No conditional orders during extended hours?!? WTF?!?
@chunyuchiu32904 жыл бұрын
for scenario 5, will the buy order still be submitted if my thinkorswim platform isnt open?
@TOSIndicators4 жыл бұрын
As long as the submitted order is still an active order, it should be submitted if the conditions are met.
@hafidinvest90522 жыл бұрын
Hello I have a study but it is not working. It's much less simple than this, but it doesn't work. The algorithms don't seem to work well and don't take commands seriously. can I communicate with you
@ukdukd34513 жыл бұрын
Scenario 7 giving error at volume line, is it possible to correct?
@TOSIndicators3 жыл бұрын
You can download our code directly from our website, and compare against your own code to see where you may be facing issues: tosindicators.com/indicators/automated-trading
@ryanvaupel98714 жыл бұрын
Hello. My order condition screen doesn't display the AlertValue bar at the bottom. How do I add it?
@TOSIndicators4 жыл бұрын
Hi Ryan - Not sure what you mean by this, but if you are missing the screen altogether, that would be a question for TDA to help you debug your instance of the platform.
@SaveManWoman4 жыл бұрын
The cost?
@hackmedia77552 жыл бұрын
looks like I need to use the python API to get fully-automated.
@aliasirealestate10533 жыл бұрын
2. For the second scenario, the order time frame cannot be DAY. Obviously, the last day closing price did not meet the criteria, otherwise, there was no need for deploying any code and one could sell the CONDOR on the get-go. This code cannot be triggered with today’s closing price because by definition when we learn today’s closing price, the market is already closed and our order is expired. In conclusion, either we have to change the order to GTC or GTD. Question: “if I want to run this code on a daily chart but if I intend to trigger the order soon after the ticker price comes within that range, what variable should I be using instead of CLOSE? so it would be reflective of instant stock price, not daily closing price.”
@andyatmosphere3 жыл бұрын
You’d have to go to Alpaca Trading and use Python to have fully automated trading.
@pttrader73734 жыл бұрын
I tried to input my code and saved it as a custom order but upon opening the saved order again, the code is cut and not showing all of the codes. Can this be fixed?
@TOSIndicators4 жыл бұрын
I'm not aware of a way to save an order template to keep re-using the same piece of code. The alternative that I've found to be more reliable is save the code as a separate .txt file locally, to copy/paste in any time the same order condition code is needed.
@pttrader73734 жыл бұрын
@@TOSIndicators thank you very much! I am doing that right now
@liuzuoyi70084 жыл бұрын
The Scenario 1 is wrong. Your condition should be to buy MSFT if the price is cross over $179.18 in first 15 mins. But you submit the OCO at buy MSFT at $179.18 and the last price is $178.6 which is lower than $179.18. So when you submit the OCO order for Scenario 1, it will execute at $178.6 or lower price and it is possible that the price will not cross over $179.18 in first 15 mins. Could you make a correction for the scenario 1?
@TOSIndicators4 жыл бұрын
Hi Liu - Scenario 1 is correct, along with the code. The conditional order for entry (not the OCO) is at whatever price the VB levels suggest (using a STOP, not a LIMIT order). The order will only trigger if our conditions are met, after which the OCO orders are automatically in place. If the order does not trigger by 6:45 am PT, the order automatically cancels using the time based triggers.
@TOSIndicators4 жыл бұрын
Scenario 1 uses a hard-coded VB Level via a stop limit order (stop if you don't care about gaps), with a time-based order expiration. Feel free to email us at contact@tosindicators.com if you need any further clarification.
@jm32804 жыл бұрын
@@TOSIndicators Yeah, this is confusing to me, too. Your buy order is a limit order higher than present price... Why wouldn't this immediately execute?