Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Time parameters in strategy builder

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

    Time parameters in strategy builder

    Hello,

    I am using ninjatrader 8 strategy builder, and I had a few question with regards to setting some time constraints:

    1) Is there a way to have the strategy automatically close a position if it has been open for, say 5 minutes? The position was generated automatically by the strategy.

    2) Is there a way to force the program to not open any new positions for 5 minutes after the close of the last position (so basically no positions will be within 5 minutes of each other)?

    I hope these questions make sense. Ask any clarifying questions if needed.

    Also, a solution I could implement using the strategy builder would be ideal, since I have little coding experience. However, if someone were to walk me step by step through the process of coding it then I could probably handle it.

    Thank you.

    #2
    Hello Timetrader,

    Welcome to the forums!

    NinjaScripts are event based using the data series that the strategy is attached to to drive the strategy logic. You could apply the strategy to a 5 minute data series for logic that would occur every 5 minutes, however, please note if there are no ticks, there will be no strategy events.

    You can use Misc > "Bars since entry" / "Bars since exit" together with applying the strategy to a specific time based data series keeping in mind the limitations above to design this logic.

    If you have not seen the full Strategy Builder 301 webinar, I highly recommend doing so as it provides a great guide for using this tool.

    Strategy Builder 301 - https://www.youtube.com/watch?v=HCyt90GAs9k

    If you would specifically like add time based actions in addition to event based actions, this can be done with custom programming. We would not be able to provide step by step programming assistance as this exceeds the scope of services we may provide, however, we could have a representative of our EcoSystem reach out with information on NinjaScript Consultants who would be happy to write the code for you.

    If this is something that interests you, please let us know.

    Comment


      #3
      Thank you for the prompt response. I will watch the webinar and try to implement this into my strategy tonight.

      That would be great if someone from the EcoSystem could get in contact with me.

      Thank you again!

      Comment


        #4
        Originally posted by Timetrader View Post
        Thank you for the prompt response. I will watch the webinar and try to implement this into my strategy tonight.

        That would be great if someone from the EcoSystem could get in contact with me.

        Thank you again!

        Hello Timetrader,

        This is Jared from the NinjaTrader Business Development team responding on behalf of my colleague Jim.

        You can search our extensive library of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:

        Search trading indicators, apps and services to personalize your NinjaTrader software. Explore custom trading indicators, automated strategies, free trading apps & more!


        You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.

        Let me know if I may be of further assistance

        This NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
        Jared M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        647 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        369 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        108 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        572 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X