Try this NQ Strategy + Code for ThinkorSwim

For that functionality you would need to use Conditional Orders... They can be coded with just about any conditional criteria, including referencing Studies... The downside to that is you would need to determine a way to have Stop Limit coded into your Conditional Order... Or have order templates setup for that purpose... You could also have a OCO Conditional Order setup with Stop Limit for the Entry and the Exit... A bit slower than autosend in Active Trader, but doable...
It's much faster to just setup a template trigger with OCO order, then right click on chart and choose custom buy, then choose the saved template. Probably the fastest way to place a stop limit order to open. I just wish they would add this functionality to active trader, which would be very convenient.
 

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

It's much faster to just setup a template trigger with OCO order, then right click on chart and choose custom buy, then choose the saved template. Probably the fastest way to place a stop limit order to open. I just wish they would add this functionality to active trader, which would be very convenient.

Agreed... I don't rely on Stop Limits so both methods discussed work fine for me but I understand how they can be handy under certain circumstances... (y)
 
The indicator is literally just a 20ema that changes colors when price closes above or below the ema. You can just use the regular ema study in TOS and follow the simple instructions in the first post.
Thanks. The script is working. But I am confused why it shows only for some of the stcoks and not all. For ex: It shows on T but not on TSLA. That looks like a good indicator and want to see for all the stocks.
 
@madeinnyc: I am using a 1 minute chart.
@zee2881: Thanks for the info. I will dig into that further.
@stockminion: I created this video for you and anyone else interested in learning how to do this.
@BenTen: Still learning how to use this site. Sorry for the improper post tags, etc.

/NQ trading video: https://www.dropbox.com/s/liql6pl1vmrcd53/NQ_Strategy.mp4?dl=0
Hello - I used the script
https://usethinkscript.com/threads/try-this-nq-strategy-code-for-thinkorswim.1958/page-8

I tried this code in the above post and added to TOS. It looks like it is working for some stocks and not for some. The lines are not showing for ALL the stocks. It shows for some and not for others. what am I doing wrong?

Can see the line here:
YvkG0Y0.png


No Line here
HaG2F4t.png


Line here
oya6Nim.png


No line here
8i5i9c6.png
 
Here is the code:
Code:
plot myindicator=ExpAverage(close,20);
myindicator.SetDefaultColor(Color.White);
myindicator.AssignValueColor(if close>=myindicator then Color.Green else Color.Red);
myindicator.SetStyle(curve.LONG_DASH);
myindicator.SetPaintingStrategy(paintingstrategy.LINE_VS_SQUARES);
myindicator.SetLineWeight(5);
myindicator.setHiding(if close>open(period="DAY") then 0 else 1);
Can someone help me add two labels? - one for stop price and one for close price of the crossing(trigger) candle.
For price crossing below ema, stop is 1 tick above the high of the signal candle.
For price crosing above ema, stop is 1 tick lower than the crossover candle.
.
Came this far with the code, but nothing shows up on the chart when crossing happens!
I must be doing something wrong!
Code:
def vSignalCandleClose;
def vSignalCandleStop;

def vEMA = MovingAverage(AverageType.EXPONENTIAL, close, 20);
def closeAboveEMA = close[1] < vEMA[1] and close > vEMA;
def closeBelowEMA = close[1] > vEMA[1] and close < vEMA;
#
##---------
if (closeAboveEMA) {
    vSignalCandleStop = low - .25;
    vSignalCandleClose = close;
 } else {
 if (closeBelowEMA) {
    vSignalCandleStop = high + .25;
    vSignalCandleClose = close;
 } else {
    vSignalCandleStop  = vSignalCandleStop;
    vSignalCandleClose = vSignalCandleClose;
 }
 }
#
Alert(closeAboveEMA, “NQ – Close Crossed Above EMA – BUY”, Alert.BAR, Sound.Chimes);
Alert(closeBelowEMA, “NQ – Close Crossed Below EMA – SELL”, Alert.BAR, Sound.Ding);
AddLabel (yes, “Close of Signal Candle” +  (vSignalCandleClose)  );
AddLabel (yes, “SuggestedStop” +  (vSignalCandleStop)  );
 
Absolutely! Let me know how it goes!! Last long trade just went 99 points (max run) from entry (7217.25 long @ 7:57PM Chicago time). And you're probably long now for another 80 points! (may have already taken profit) :cool:
Thank you for your postings and information. Do you offer ToS coding services. I have a short/simple exit strategy I would like to have coded.
Many thanks for a response either way. RANGERBILL
 
Was looking for the video mentioned above, but it looks to have been deleted. Any chance of getting it reposted ? Thanks !
Did you know that clicking on a member's avatar will allow you to see when a member was last seen on the uTS forum?
@AlgoTrader77, the member that posted that video has not been seen in a long while. :(
 
I don't think you need the video. It is quite simple... all he did was take trades on the crossing of the 20 EMA. With the recent volatility and chop, trading on a 1 Min chart will always get your stops. So, if you do want to try this strategy, use the 1 Min for entries and then switch to 5 Min or higher to stay in the trade longer. As with any strategy, it depends entirely on the market conditions. What works one day may not work the next!
 
plot myindicator=ExpAverage(close,20); myindicator.SetDefaultColor(Color.White); myindicator.AssignValueColor(if close>=myindicator then Color.Green else Color.Red); myindicator.SetStyle(curve.LONG_DASH); myindicator.SetPaintingStrategy(paintingstrategy.LINE_VS_SQUARES); myindicator.SetLineWeight(5); myindicator.setHiding(if close>open(period="DAY") then 0 else 1);
Thanks for this indicator. I use in conjunction with other scripts I got here.
 
I never trade the Nasdaq, but is the ticker in ToS /NQ? Also, am I correct in saying that their options volume is very low?
 

Not the exact question you're looking for?

Start a new thread and receive assistance from our community.

87k+ Posts
272 Online
Create Post

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