Mark
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Adding additional indicators to basic strategy
Collapse
X
-
I'm not sure this is working properly. Under set 1 I currently have when one EMA crosses above another EMA then go long and under set 2 it is the opposite; go short when one crosses below.
I would like to add to both set 1 and set 2 a condition that says only go long or go short if ADX is greater than 30. I added this condition under both set 1 and set 2, but when I ran the backtesting it only showed 6 trades over 4 months.
I'm sure there is something I'm not doing correctly. I appreciate your help.
Comment
-
I went through the trades it was making on the chart and it wasn't working properly. I am not able to capture a screen shot because I'm using virtual box on mac to trade NT. Here is what I have on set one:
When the following conditions are true:
CrossAbove(SMA(Fast), SMA(Slow), 1)
ADX(14[0]>30
Do the following:
EnterLong(1,"Long 1")
Set 2
When the follwoing conditions are true:
CrossBelow(SMA(Fast), SMA(Slow), 1)
ADX(14)[0]>30
Do the following:
EnterShort(1, "Short 1")
What I want to have done is for the program to trade when the SMAs cross above AND the ADX is above 30. I would like to also add a trailing stop to this and a stop loss. I wasn't able to get that working properly either. I would also like to go short when the SMAs cross below. Looking back through the charts, these conditions take place multiple times per day, so there should be plenty of trades to track.
Sorry to be a pain, but I'm just not understanding how to utilize the strategy analyzer yet. I appreciate your help.
Mark
Comment
-
Mark, what you've setup is ok - if you add multiple conditions like you did, they are linked by the boolean AND operator so both have to be true to trigger the 'actions'. I suggest you add a drawing to visually check off your conditions on the chart.
You can add a trailing stop in the stops and targets section via the SetTrailStop commend, unfortunately you can't do a static stop loss and trailing stop together on the same position in the wizard (only possible by custom coding).BertrandNinjaTrader Customer Service
Comment
-
So do I need to set up an additional user defined input? Currently I only have 2 user defined inputs, one is for my Fast MA and the other is for my Slow MA and both are set to type integer. Do I need to change these to Bool and add an additional one.
If it were you, how many drawing tools would you add?
Are you available to talk with on the phone?
Thank you again for all your help.
Mark
Comment
-
You want to keep the integer inputs you have for the MA lengths, you can add another one to set the ADX level as needed.
Just add for example a dot above / below the bar when your conditions trigger, this way you get a visual headsup that the system prepares to trade on the next bar.
If you contact us at support at ninjatrader dot com we can schedule a call with you.BertrandNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by cre8able, Today, 04:22 PM
|
0 responses
1 view
0 likes
|
Last Post
by cre8able
Today, 04:22 PM
|
||
Started by RichStudent, Today, 04:21 PM
|
0 responses
1 view
0 likes
|
Last Post
by RichStudent
Today, 04:21 PM
|
||
Started by cre8able, Today, 04:16 PM
|
0 responses
6 views
0 likes
|
Last Post
by cre8able
Today, 04:16 PM
|
||
Started by cre8able, Yesterday, 03:20 PM
|
3 responses
18 views
0 likes
|
Last Post
by cre8able
Today, 04:08 PM
|
||
Started by StrongLikeBull, Today, 04:05 PM
|
0 responses
5 views
0 likes
|
Last Post Today, 04:05 PM |
Comment