We may earn commissions from the companies mentioned in this post. View our FTC disclosure for more information.
Have you ever wished there was some way to enter your order without using emotion to drive your decision? Wouldn’t it be nice to have a script that can automatically enter your order only under certain conditions? You can! Using thinkScript in thinkorswim (TOS), you are able to set up an order that will only be triggered under whatever conditions you choose. In this post I’m going to tell you how to set up an advanced order with a “first triggers one cancels other” but only on above average volume. It’s a perfect way to get into a intra-day high breakout without having to stare at the chart all day!
First thing’s first. You have to have a good chart. In this example of TG Therapeutics from 12/10/2020, there was a morning high of 41.17 followed by a pullback to the 30 period moving average. I’m using a 30 period exponential moving average on a 5 minute chart here.
After the bounce off the moving average, which you missed because you were focused on some other chart that was shitting all over your day, it climbed higher to retest that high. Once you see that a prior level of resistance is being tested, you can start to decide if the risk/reward ratio is potentially good enough to take a trade. In this case, the prior resistance level was a bit over 40.50, give or take a dime, so a stop below the half dollar would be reasonable, I think. At this point, you could begin to enter your order. Using the order entry screen, you can choose to select the type on the left, First Triggers OCO in this case since we’re planning on being away from the screen if/when this order triggers (sorry, the selection dropdown didn’t make it into my screenshot). That’s the beauty of it. Regardless of what you have going on, this order will not trigger if your conditions aren’t met.
After you set up your buy stop limit, sell limit and sell stop, you will click on the gear icon in the upper right corner of the TOS order entry screen. That brings up the Order Rules window.
From here, you’ll see that all the other details you’ve already included in the order are set up. You could alternatively wait to enter the order details in this window if you like. This is where we will add the conditional logic for our volume trigger. In the conditions section of this window, click into the symbol box. It may already be pre-populated with the current ticker, but I find that I need to click in the box for it to fill with the current symbol. Next, click into the Method field and choose STUDY from the list. The submenu has some prepopulated items, but we’ll skip those and choose Edit. Now we’re getting somewhere!
In the Study Order Condition window you will need to choose the aggregation period (1 min, 5 min, or whatever timeframe you’re trading in) at the very top left. Choose the thinkScript Editor tab at the top, if it’s not already selected, and paste the following thinkScript into the text area:
plot itsBig = volume > 1.5*average(volume, 30);
If you would like, you may change the values of 1.5 and 30 to whatever you like. In this script, the trigger is volume that is 1.5 times the average volume over a period of 30 bars. If you’re using a different timeframe, or you would like additional volume confirmation…say volume that’s twice the average over the last 10 periods, just update those numbers with 2 and 10, respectively. If you had taken the trade in the above example, you would have hit target easily for a nice 2R profit!
I hope you find this information useful. If so, please leave me a comment! I’m bored as hell and would love to talk with you. Also, if you haven’t been bothered enough by my website to check out my latest music album (masterpiece, if I do say so myself), here’s another poke to check it out. I’m really proud of it and I think you’ll dig it if you give it a chance! If you hate it, please share it with your friends and family anyway. They might like it! Thanks so much for your visit, and I wish you all the best profits!!!