Mark
Announcement
Collapse
No announcement yet.
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).
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.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
637 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
569 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
571 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment