Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy not enabling on Daily Bars

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

    Strategy not enabling on Daily Bars

    Hi

    I am new to ninja development and i am facing a little issue.
    I have written a strategy that is supposed to trade. I am using it on "SoyaBeans" Future.
    When I set the chart properties to Minute 1 , while days to load is set to "0" as i don't want my strategy to compute on historical data, i work perfectly.
    But when i set the Chart Properties to Daily 1, while days to load is set to "0" it doesn't enable.
    I am also using CalculateOnBarClose = false so that i look at all ticks.

    Can any one help me in this regard.

    Regards
    Hussain

    #2
    Hussain, welcome to NinjaTrader and our forums. If you set BarsRequired to 0 as well, would it enable then for the daily?

    Comment


      #3
      Hi Bertrand!

      Thanks for your prompt reply.
      But I have already done that and it doesn't work with daily bar.
      Though it is working with Minute and tick data.
      This is my initialize:
      SyncAccountPosition = true;
      Unmanaged = true;
      Enabled = true;
      BarsRequired = 0;
      CalculateOnBarClose = false;

      Looking forward for your response.

      Hussain

      Comment


        #4
        Thanks Hussain, checked further into - you would need to at least have 1 day loaded with BarsRequired 0 to see the enablement happen. This is because if you load with 0 bars, no bar has actually closed for the daily, so the BarsRequired could not be met or exceeded. If you just with to run on realtime, this could be achieved otherwise as well :

        Comment


          #5
          Originally posted by NinjaTrader_Bertrand View Post
          Thanks Hussain, checked further into - you would need to at least have 1 day loaded with BarsRequired 0 to see the enablement happen. This is because if you load with 0 bars, no bar has actually closed for the daily, so the BarsRequired could not be met or exceeded. If you just with to run on realtime, this could be achieved otherwise as well :

          http://www.ninjatrader.com/support/h...historical.htm
          Thanks Bertrand!.
          I will check this out and let you know if it works or not.

          Thanks Again
          Hussain

          Comment


            #6
            Hi

            We appreciate your help. Basically what I have understood from your answer and the link is that if I want to run my strategy on daily data then it must have at least 1 day historical data to use as a pivot. This does not seem very logical tho, as my strategy doesn't have to wait for any data because it is looking on each tick as I have set CalculateOnBarClose as false. So this constraint doesn't help much.
            We can follow these steps, but our client who is a trader won't fancy having to come back and enable the strategy after a day as he works on daily chart. We also don't expect him to have historical data. I know we can get this to work if he uses a tick chart type, but we are just looking for a cleaner/sophisticated solution. I hope there is a way around this that you can suggest.

            Thanks,
            Hussain

            Comment


              #7
              Hi

              We appreciate your help. Basically what I have understood from your answer and the link is that if I want to run my strategy on daily data then it must have at least 1 day historical data to use as a pivot. This does not seem very logical tho, as my strategy doesn't have to wait for any data because it is looking on each tick as I have set CalculateOnBarClose as false. So this constraint doesn't help much.
              We can follow these steps, but our client who is a trader won't fancy having to come back and enable the strategy after a day as he works on daily chart. We also don't expect him to have historical data. I know we can get this to work if he uses a tick chart type, but we are just looking for a cleaner/sophisticated solution. I hope there is a way around this that you can suggest.

              Thanks,
              Hussain

              Comment


                #8
                Sorry Hussain - would not really be aware of a workaround for you - do you need the daily bars then for the script? Or is this just to open a chart and process incoming Level 1 tick data on COBC = false?

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                666 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                377 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                110 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                575 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                580 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X