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 Rapine Heihei, Today, 08:19 PM
|
1 response
8 views
0 likes
|
Last Post Today, 08:30 PM | ||
Started by Rapine Heihei, Today, 08:25 PM
|
0 responses
6 views
0 likes
|
Last Post Today, 08:25 PM | ||
Started by f.saeidi, Today, 08:01 PM
|
1 response
9 views
0 likes
|
Last Post Today, 08:17 PM | ||
Change colour of Stop market and limit orders to red and green via indicator script
by Rapine Heihei
Started by Rapine Heihei, Today, 07:51 PM
|
0 responses
8 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by frslvr, 04-11-2024, 07:26 AM
|
5 responses
98 views
1 like
|
Last Post
by caryc123
Today, 07:47 PM
|
Comment