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!
See more
See less

Partner 728x90

Collapse

5 Consecutive Green Bars

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

    5 Consecutive Green Bars

    I've searched and scrolled here but cannot find a strategy for say 5 consecutive up (Green) bars, or 5 consecutive down (Red) bars.

    New to strategy builder and don't know an input from a variable, but want this strategy to auto execute eventually. I'm using NinjaTrader 7.

    #2
    Hello b2fnow,

    Thanks for your post.

    Based on your last comment we have moved the post to the NT7 strategy forum.

    With NinjaTrader you have two indicators that would help with this, they are called NBarsUp and NBarsDown where you can configure them for the number of sequential bars desired. As the condition is found the indicator outputs a value of 1 into an indicator panel.
    References:
    NBarsUp: https://ninjatrader.com/support/help...?n_bars_up.htm
    NBarsDown: https://ninjatrader.com/support/help..._bars_down.htm

    I recommend that you place them on your chart to both observe and test their function to ensure their suitability for your strategy.

    You can use these methods in the NT7 strategy wizard. In a condition set, on the left side under indicators you would select NBarsUp (or NBarsDown) and specify the number of sequential bars to check for in "Bars count", in the center would select "==" and then on the right side you would select MISC>Numeric value and set the number to 1 which is what the indicator provides when the condition is found. Then you can place an order in the action section.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Thank you for your excellent description!

      I was able to get it working with both up bars and consecutive down bars in the same strategy.

      All done.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by dtaylor, Yesterday, 04:29 PM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by GLFX005, Today, 04:59 AM
      3 responses
      18 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by ezrollin, Yesterday, 11:16 PM
      1 response
      9 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by galsermil, Yesterday, 05:49 PM
      4 responses
      12 views
      0 likes
      Last Post galsermil  
      Started by IMYSnin, Today, 06:40 AM
      0 responses
      5 views
      0 likes
      Last Post IMYSnin
      by IMYSnin
       
      Working...
      X