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

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.
    JimNinjaTrader Customer Service

    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 adeelshahzad, Today, 03:54 AM
        5 responses
        32 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Started by stafe, 04-15-2024, 08:34 PM
        7 responses
        32 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by merzo, 06-25-2023, 02:19 AM
        10 responses
        823 views
        1 like
        Last Post NinjaTrader_ChristopherJ  
        Started by frankthearm, Today, 09:08 AM
        5 responses
        22 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        43 views
        0 likes
        Last Post jeronymite  
        Working...
        X