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

Getting under construction bar values

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

    Getting under construction bar values

    Hello support,

    I am writing an indicator in which I need the current days volume so if I run my indicator anytime before the close such as 8:45am then it would give me the total daily volume from 8:30 to 8:45 or if run at 12noon, then it would give total volume from 8:30 to 12 noon.

    A little restriction here is that for some reasons I can only get bars using GetBar method in my indicator and I was able to get the latest bar with this method but prices of that bar were not matching the chart values. Attached is the sample indicator which I was using to achieve this.

    Please advise how can I get the bar values that is not fully constructed yet.

    Thanks,
    Attached Files

    #2
    turn the "CalculateOnBarClose" to false.
    Values wont update until bar finished otherwise.

    Comment


      #3
      Wajeeha, marty's comment for working with the currently developing bar would hold true, however the Data.Bars.GetBar would not be documented nor supported by us. I would just arrive at the daily volume then by other means, for example summing up your bar series volume.
      BertrandNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      43 views
      0 likes
      Last Post bill2023  
      Started by yertle, Today, 08:38 AM
      6 responses
      25 views
      0 likes
      Last Post ryjoga
      by ryjoga
       
      Started by algospoke, Yesterday, 06:40 PM
      2 responses
      24 views
      0 likes
      Last Post algospoke  
      Started by ghoul, Today, 06:02 PM
      3 responses
      16 views
      0 likes
      Last Post NinjaTrader_Manfred  
      Started by jeronymite, 04-12-2024, 04:26 PM
      3 responses
      46 views
      0 likes
      Last Post jeronymite  
      Working...
      X