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

daily bars: best approach in practice?

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

    daily bars: best approach in practice?

    Hi there

    My strategy uses daily bars on close.

    Whats the best option for putting this into production? Ie buy at 3:30pm before close? Buy at open with limit?

    Any code snippets to help with that?

    I am using paid kinetick data feed and interactive brokers.

    Im new to NT7

    #2
    Hello cyman,

    Thank you for your note.

    This is the NT8 section of the forum but you mention NT7, I would encourage you to learn NT8 if you’re new to NinjaTrader.

    If you run your strategy on Daily Bars, with Calculate set to OnBarClose, then upon a signal, and order will be submitted on the opening of the next bar.

    I would suggest watching the Strategy Wizard 301 which goes over using the wizard to create strategies.

    Understand the fundamentals of basic strategy creation by developing an actual strategy using the NinjaTrader Strategy Wizard.3:23 Strategy Wizard Overview7:...


    See the NinjaScript Editor Youttube,
    Dive into manipulating C# code from within an unlocked NinjaScript strategy using the NinjaScript Editor.NinjaTrader 7 is an award winning end to end online ...


    A link to our Help Guide with tutorials can be found below:


    You will find Reference Samples online as well as some Tips and Tricks for both indicators and strategies:

    Click here to see our NinjaScript Reference Samples:


    Click here to see our NinjaScript Tips:


    I would suggest reading about the managed approach at the following link,


    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks. But whats the best approach people have seen, in practise?

      Also: how can I make a daily bar at say 3PM each day?

      I see I can choose multiple minutes per bar but that seemed to create a random result. What I want is once per day at Xpm.

      Also with daily bars, suppose a stock closes at $100 then after hours opens at $120. That will throw off the algorithm. In practise the buy would happen at $120 not $100. But the bars would only see the closing price. So I really need 15 minute bars with a daily evaluation. Aside from hardcoding (ie if time is blah then do this) is there a better way to do this?

      Also consider that I want to test efficiently for optimization so minimal daily bars is ideal.

      Comment


        #4
        Hello cyman,

        We do not have the data to be able to say what is the best approach people have seen, but perhaps someone on the forum could provide insight.

        To create a daily bar at 3PM each day, you could create a session template which has a close time of 3PM, then apply that template to a 1440Min chart. There are 1440 minutes in a day, and this chart would be built of 1 minute data, using a session template would be a way to control the open and close times.

        See Trading Hours,


        If a stock closes at 100 and your system submits a buy order, you’d be filled at $120, not $100.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Brevo, Today, 01:45 AM
        0 responses
        4 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        3 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        240 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Started by oviejo, Today, 12:28 AM
        0 responses
        6 views
        0 likes
        Last Post oviejo
        by oviejo
         
        Working...
        X