Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

volumatric bar erroor

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

    volumatric bar erroor

    I was trying fetch current candle poc and and previous candle poc value using below code
    and i have attached error in screenshot please guide me

    if cpoc and ppoc should return with some numeric value that what i was looking for like price of POC

    // Access Volumetric bars
    VolumetricBarsType volumetricBars = BarsArray[1] as VolumetricBarsType;
    if (volumetricBars == null)
    return;

    double Cpoc = volumetricBars.GetPointOfControl(CurrentBar);
    double Ppoc = volumetricBars.GetPointOfControl(CurrentBar[1]);​
    Last edited by siddhugaddi; 09-13-2024, 04:33 AM.

    #2

    Hello siddhugaddi,

    The first errors are becuse of how you defined VolumetricBarsType, it should look like this:

    NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe barsType = Bars.BarsSeries.BarsType as NinjaTrader.NinjaScript.BarsTypes.VolumetricBarsTy pe;​

    The other problem you have here is that GetPointOfControl is not a method, currently the POC is not exposed from the volumetric bars. You can see a list of the available methods that can be used here:



    The third error is simply because [1] was added to CurrentBar in the code you have used, you can just remove the [1] from that to resolve that error.

    Comment


      #3
      Thank You

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      52 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      29 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      194 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      355 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      274 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X