Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

condition for last x amount of bars in the Strategy Builder

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

    condition for last x amount of bars in the Strategy Builder

    Just a fast question. Is there an option to put this logic into the Strategy Builder, if RSI is below 0 for the last 3 bars go long?

    #2
    Hello Radano,

    Thank you for your post.

    This would be possible to accomplish using the Strategy Builder.

    In the Strategy Builder (New > Strategy Builder), navigate to the Conditions and Actions section. Ensure the 'of the following conditions are met" drop-down menu is set to 'If All', create 3 indicator to value comparisons in the Conditions section that checks if the RSI indicator 3 bars ago is less than 0, if the RSI indicator 2 bars ago is less than 0, and if the RSI indicator 1 bar ago is less than 0. Then, in the Actions section, you would add an action of EnterLong().

    See the attached screenshots and example script showing what this would look like in the Strategy Builder.

    Also, see the help guide documentation below for more information.

    Indicator to value comparisons: https://ninjatrader.com/support/help...lueComparisons

    How to enter a market position in the Strategy Builder: https://ninjatrader.com/support/help...MarketPosition

    Let us know if we may assist further.
    Attached Files
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment


      #3
      That's what I expected. I had a slight hope that it can be done with one condition line vs 3 lines. There is some work if a condition is based on e.g. last 15 bars Thank you for your insight anyway.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Yesterday, 05:17 AM
      0 responses
      81 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      149 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      79 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      52 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      59 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X