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 Waxavi, Today, 02:10 AM
      1 response
      17 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by Kaledus, Today, 01:29 PM
      5 responses
      13 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by Waxavi, Today, 02:00 AM
      1 response
      12 views
      0 likes
      Last Post NinjaTrader_LuisH  
      Started by alifarahani, Today, 09:40 AM
      6 responses
      23 views
      0 likes
      Last Post alifarahani  
      Started by gentlebenthebear, Today, 01:30 AM
      3 responses
      17 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X