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
Strategy condition to enter a trade when an indicator changes direction
Collapse
X
-
Strategy condition to enter a trade when an indicator changes direction
Perhaps it's already answered, but I didn't see it, but I am looking to code a strategy builder with a condition to enter long when an indicator changes direction from down to up, and vice versa for a short. So if the indicator's current value > prior value , and the prior value < prior value two bars ago, this is a change in direction from negative to positive. Does something exist to call this out and how is this best applied to the strategy builder? Thank youTags: None
-
Hello Binarytrader,
Thank you for your post.
Yes, that is a fairly simple thing to create in the Strategy Builder. You will need two sets of conditions, one to trigger the short trades, and one to trigger the long. I've put together a simple example strategy using the SMA indicator, however, you could modify this to use the indicator of your choice.
Here is a basic guideline of how to import and view this strategy in NinjaTrader 8:
To Import:- Download the attached file to your desktop, keep it in the compressed .zip file.
- From the Control Center window select the menu Tools > Import > NinjaScript Add-on...
- Select the downloaded .zip file
- NinjaTrader will then confirm if the import has been successful.
Once complete, you can view the strategy in the Strategy Builder by opening a new Strategy Builder window and selecting the ExampleChangeDirection strategy from the dropdown.
Here's a link to our help guide regarding building conditions in the Strategy Builder:
https://ninjatrader.com/support/help...on_builder.htm
Please let us know if we may be of further assistance to you.Attached FilesKate W.NinjaTrader Customer Service
- Likes 1
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by LawrenHom, Today, 10:45 PM
|
0 responses
3 views
0 likes
|
Last Post
by LawrenHom
Today, 10:45 PM
|
||
Started by love2code2trade, Yesterday, 01:45 PM
|
4 responses
28 views
0 likes
|
Last Post Today, 10:31 PM | ||
Started by funk10101, Today, 09:43 PM
|
0 responses
7 views
0 likes
|
Last Post
by funk10101
Today, 09:43 PM
|
||
Started by pkefal, 04-11-2024, 07:39 AM
|
11 responses
37 views
0 likes
|
Last Post
by jeronymite
Today, 09:37 PM
|
||
Started by bill2023, Yesterday, 08:51 AM
|
8 responses
44 views
0 likes
|
Last Post
by bill2023
Today, 09:27 PM
|
Comment