Try this NQ Strategy + Code for ThinkorSwim

A

AlgoTrader77

New member
Hi PlantainPapi

I prefer a 1 minute chart because 1) These movements are too big. You switch to a 5 minute and you are staring at a 90 point candle before you enter your breakout. 2) I am impatient :D and 3) The 1 minute has been handing out very nice trades during this volatility like free candy.

One of the best ways that I have found to determine whether a specific chart is conducive with your trading tolerance is to look at all of the winning trades and see how much negative those trades went against you to see if you have the type of account/tolerance to let it go that far for a win. The losing trades are losers no matter how you look at them. For the winning trades you need to see how much you need to open yourself up.

This of course assumes you have a strategy that works and you feel good about to the point of initiating execution. Once you have determined that, if it is within your guidelines then the only thing left to do is execute it.

Circling back to chart type, I can let my trades go against me 150-200 points... but that is insanity. No reason to risk that kind of cash. The 1 minute is going to usually fall in line within 5-30 points (amount negative in a winning trade). In these markets for the NQ that is very good for my style of aggressiveness. Especially since I know I will get at least 1 to 3 100+ pointers on any given day.

Hope that helps!
 
horserider

horserider

Well-known member
VIP
@madeinnyc

NO !!! It is a 20 EMA .

StandardExponential moving average code
input price = close;
input length = 20;
plot AvgExp = ExpAverage(price, length);

Same code.

This code.
plot myindicator=ExpAverage(close,20);

Plot both and see if you doubt it.
 
A

AlgoTrader77

New member
Um... this is open source. Shouldn't be any surprise what it is - or isn't for that matter. 2nd day this week I'm up over 700 points on a single market and still ~ 2 hours left in the day. Use it or don't use it. But keep it simple. These markets are moving too much not to take big rides. This is an easy way to do it.
 
madeinnyc

madeinnyc

Member
@AlgoTrader77 , There's a study on this group called, "Beyond Hull" which is the same code used in the "Moving Average Levitt Projection"...same code, but sometimes worded different when users have referenced its use on this group. If you set them to length "20" on a 5 Min chart on the /NQ, you'll notice in comparison to the one you're using it has completely different exit/entry points, which may improve your trading.

What time frame & symbol are you applying it to?
 
T

Trading51

Active member
2019 Donor
The trades are working because your adding a stop and trading a wide-ranging market, you could use almost any tool in here and get that result, stop above or below the previous bar and if your on the right side there's your move
 
Z

zee2881

New member
VIP
Um... this is open source. Shouldn't be any surprise what it is - or isn't for that matter. 2nd day this week I'm up over 700 points on a single market and still ~ 2 hours left in the day. Use it or don't use it. But keep it simple. These markets are moving too much not to take big rides. This is an easy way to do it.
Been watching this today as I trade QQQ, not sure I can handle the volatility of this strategy. Making sure my strategy is good before I jump into the deep-end with /NQ. This might be interesting to you since we're all on the spirit of sharing. I've been using the "trend-reverse Indicator" for a while and what I noticed is that a lot of times there would be a retracement after an arrow showed up on the chart. So I decided to add the 61.8% and 50% retracements to my chart, and wadda you know, works pretty damn well. Here's my strategy:
1) After an up arrow shows up, I add the retracement levels starting from the low of the candle preceeding the arrow, to the high of the candle with the arrow (opposite on a down arrow).
2) I check RSI to make sure it's moving upwards (opposite on a down arrow)
3) When it retraces back to the 50% or 61.8% level, I enter the trade
4) My stop is a close below the 100% level

I've had excellent results using this strategy on QQQ, just continuing to trade QQQ until I get more experience with this strategy before I move on to /NQ

Here's an example that I traded this morning:
 
A

AlgoTrader77

New member
@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
 
Last edited by a moderator:
BenTen

BenTen

Administrative
Staff
VIP
@AlgoTrader77 No worries. I appreciate the effort and contribution :)
 
technicallydreaming

technicallydreaming

Member
This is just a 20 EMA. Nothing new about it. Might as well put a 200 EMA with it and only trade the 20 up when above the 200 and vice versa.
that was my first thought when I read the first post!
 
F

Fedegrosso

New member
Thank you @AlgoTrader77

How would you correctly place an addorder function in order to backtest the strategy?
 
F

Fedegrosso

New member
I cut and paste the code but is not working. anyone having the same problem?

 
Last edited by a moderator:
M

mailbagman2000

New member
Looks like a chart Ken Rose put up on his Twitter account.
 
Z

zee2881

New member
VIP
@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
Hey brother, I sincerely appreciate you taking the time to create the video and share it with those of us that are very intrigued by your strategy. And I love the candor by the way! You answered all the questions I had, so THANK YOU! I'm gonna go back and watch again, probably a few times over the weekend, and paper trade it a bit. Have a great weekend!
 
A

AlgoTrader77

New member
@zee2881 Thanks and no problem!

@Fedegrosso A limit order is what I use. In TOS it would be a "stoplimit" (sell for short, buy for long) since you are getting in on the breakout/breakdown. The key is to watch the color of the line turn from red to green and visa versa. There is no guessing where to get in because you instantly have your high or low price of the candle where it changes and you can simply place your stop entry order a tick above/below that candle. i.e. Above for long positions, below for short positions. Because you are placing a buy limit to go in that direction above price, it is called a stoplimit. (TOS coders can correct me)

Also @Fedegrosso and @zwarriortrader (and anyone else wanting to give this a go)

As far as the code, try this sequence:

1. Open a notepad doc.
2. Scroll up to the post that contains the code and copy and paste it into your doc. We'll come back to this in step 7 and 8.
3. In TOS, open any chart. I like the NQ using a 1 minute time frame.
4. Right click, hover over "studies" and select "edit studies" (you can also get there by clicking on the test tube looking icon at the top right of your chart).
5. Then click "Create".
6. This will open a work space you can paste the code into. Before you do that, delete the default line of code in there "plot Data = close;".
7. Go back to your notepad doc and highlight and copy the code.
8. Paste it into that work space.
9. At the very top you can name it whatever you want. The default is "NewStudy0". So just delete that and name this something you can remember.
10. Then click "ok" and go back to your chart and add it like you would any other indicator.

Let me know if that does the trick or if you have any other questions.
 
F

Fedegrosso

New member
Thank you @AlgoTrader77

Yes that's what I did, I added the study but still it does not appear on chart. Don't know what I've been doing wrong. See the attached Pic.


And yeah I was trying to automate the study, maybe some more advanced think-script coder here, can suggest how to add a proper "AddOrder" function to backtest the strategy.
 
A

AlgoTrader77

New member
@Fedegrosso
Oddly enough I added it to a different chart and it did not show until I clicked and dragged my chart around. Maybe I need to rename this the "hidden indicator" lol.

But literally clicking and dragging my chart made the indicator show up. Then you can go in and change how it's displayed. You can see in my examples I changed it to a straight line and reduced the width. But whatever you prefer.

Try manipulating your chart a bit (move it around) and see if that does the trick.

Not sure why it would do that. The code is quite simplistic.

And yes, on automation... I am playing around with it with my limited (extremely limited) TOS coding knowledge. Shouldn't be that difficult if someone here that is more expert than I am wants to give it a go. This would be really cool to automate. If it did half of what I am doing manually it would be killer!! You guys could retire! :D
 
Top