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 NullPointStrategies, Today, 05:17 AM
      0 responses
      38 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      64 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      41 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X