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
ADX slope issue
Collapse
X
-
ADX slope issue
I want to enter a long the first bar after the ADX slopes up, not every time the ADX slopes up though. when the ADX resets and slopes down then I can reenter after another slope up of the ADX. Also, when I enter, the trade must go 5 pts and then the ADX must reset before I enter a trade in the same direction. Anyone know how to do this? ThanksTags: None
-
Hello,
It only pertains to what your programming level is.
If you have no programming experience the strategy wizard is a good place to start.
You will want to use the rising() functions. Add Rising to the left side of the condition builder and then change the parameter to be the ADX. Then on the right side of the condition builder add Misc->True and in the middle use the == sign. To express this condition.
I belive you have got this far thus far, but what you will want to add now is to use a varaible in this same set with the EnterLong(). Then set this variable to 0 for example. As part of your checking for entry condition the entry must also have this variable == 0. Then set this variable to 1 when you EnterLong(), then using Falling and once the falling condition has completed then set this variable back to 0 to allow the rising condition to trigger a trade again.
Let me know if I can be of further assistance.
Comment
-
Hi,
Thanks for your help, I'm still not exactly clear on this. I take longs when the DI plus is above the DI minus and when I get ADX slope and shorts when the DI minus is above the DI plus and I get ADX slope. For the short part in Do The Following i put EnterShort((int)(Variable0),"") and in the when the following conditions are true box I put Variable0==0. I have this all in set 1, how many sets do I need? How do I start another set after one is completed? Maybe you could dumb it down for me a little, Thank You!!
Comment
-
You cannot do that all in Set 1. To start another Set just switch to a different Set tab up on the top. Each set is evaluated in sequential order from Set 1 to Set 2 to 3 and so on and so forth.
Also, you should not be putting Variable0 into your EnterLong(). That would mean you are trading that quantity which does not make sense. Variable0 is just to help you determine if you will trade or not trade.Josh P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by benmarkal, Yesterday, 12:52 PM
|
3 responses
22 views
0 likes
|
Last Post Today, 05:22 AM | ||
Started by helpwanted, Today, 03:06 AM
|
1 response
18 views
0 likes
|
Last Post Today, 03:35 AM | ||
Started by Brevo, Today, 01:45 AM
|
0 responses
11 views
0 likes
|
Last Post
by Brevo
Today, 01:45 AM
|
||
Started by aussugardefender, Today, 01:07 AM
|
0 responses
6 views
0 likes
|
Last Post Today, 01:07 AM | ||
Started by pvincent, 06-23-2022, 12:53 PM
|
14 responses
244 views
0 likes
|
Last Post
by Nyman
Today, 12:47 AM
|
Comment