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 love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      36 views
      0 likes
      Last Post love2code2trade  
      Started by alifarahani, Today, 09:40 AM
      2 responses
      13 views
      0 likes
      Last Post alifarahani  
      Started by junkone, Today, 11:37 AM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by pickmyonlineclass, Today, 12:23 PM
      0 responses
      1 view
      0 likes
      Last Post pickmyonlineclass  
      Started by frankthearm, Yesterday, 09:08 AM
      12 responses
      44 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X