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

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?
    BertrandNinjaTrader Customer Service

    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 :

        BertrandNinjaTrader Customer Service

        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?
                BertrandNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by nightstalker, Today, 01:32 PM
                0 responses
                1 view
                0 likes
                Last Post nightstalker  
                Started by NTCalmPersistence15, Today, 10:03 AM
                1 response
                10 views
                0 likes
                Last Post NinjaTrader_ChristopherJ  
                Started by DawnTreader, 05-08-2024, 05:58 PM
                13 responses
                45 views
                0 likes
                Last Post NinjaTrader_Gaby  
                Started by jpeep, 08-16-2020, 08:31 AM
                15 responses
                497 views
                0 likes
                Last Post notenufftime  
                Started by ldanenberg, Yesterday, 03:19 PM
                2 responses
                13 views
                0 likes
                Last Post ldanenberg  
                Working...
                X