Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy condition to enter a trade when an indicator changes direction

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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 you

    #2
    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:
    1. Download the attached file to your desktop, keep it in the compressed .zip file.
    2. From the Control Center window select the menu Tools &gt; Import &gt; NinjaScript Add-on...
    3. Select the downloaded .zip file
    4. NinjaTrader will then confirm if the import has been successful.
    Critical - It will prompt that you are running newer versions of @ SMA and ask if you want to replace, press 'No'

    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 Files
    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Thank you Kate. This is perfect!

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by ashwagandhaplus, Today, 12:04 AM
      0 responses
      5 views
      0 likes
      Last Post ashwagandhaplus  
      Started by ashwagandhaplus, Today, 12:02 AM
      0 responses
      4 views
      0 likes
      Last Post ashwagandhaplus  
      Started by truvalastfrnce, Today, 12:01 AM
      0 responses
      3 views
      0 likes
      Last Post truvalastfrnce  
      Started by truvalastfrnce, Today, 12:00 AM
      0 responses
      4 views
      0 likes
      Last Post truvalastfrnce  
      Started by Ericawin, Yesterday, 11:57 PM
      0 responses
      4 views
      0 likes
      Last Post Ericawin  
      Working...
      X