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

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
    Brandon H.NinjaTrader Customer Service

    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 josh18955, 03-25-2023, 11:16 AM
      6 responses
      436 views
      0 likes
      Last Post Delerium  
      Started by FAQtrader, Today, 03:35 PM
      0 responses
      5 views
      0 likes
      Last Post FAQtrader  
      Started by rocketman7, Today, 09:41 AM
      5 responses
      18 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by frslvr, 04-11-2024, 07:26 AM
      9 responses
      127 views
      1 like
      Last Post caryc123  
      Started by selu72, Today, 02:01 PM
      1 response
      14 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Working...
      X