Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Candle VPOC

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

    Candle VPOC

    Hello,

    iam trying to extract the VPOC from the candles inside an indicator. Ist this possible?

    Thanks!

    #2
    Hello Lopat,

    Thank you for your note.

    Are you referring to a VPOC value from the Order Flow Volume Profile? If so, unfortunately, there is no NinjaScript access to this tool. The Order Flow tools with NinjaScript access available are the Cumulative Delta, Volumetric Bars, and VWAP as detailed at the following links:Please let us know if we may be of further assistance.

    Comment


      #3
      Hello Emily,
      thanks for the response. Yes i want to extract the VPOC from the volumetric bars. Each Volumetric Bar.



      There is no method for the VPOC. Is there any alternative?

      Comment


        #4
        Hello Lopat,

        Thank you for your reply.

        You can get the POC from a volumetric bar by using GetMaximumVolume. This gets the highest Ask, Bid, or combined volume for the bar and will return the price at which it occurred. GetMaximumVolume is documented on this page and I suspect it is what you are looking for in regard to volumetric bars:


        Please let me know if I may be of further assistance.

        Comment


          #5
          Hello, i have another similiar question. I want to substract the ask from the bid. And plot it in a line (perfect would be a histogram but i dont get how to plot a histogram)

          But with this code i always get the error: Error on calling 'OnBarUpdate' method on bar 0: Index was outside the bounds of the array.


          protected override void OnBarUpdate()
          {

          if (Bars == null)
          return;

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

          if (barsType == null)
          return;



          MaximumAskLine [0] = barsType.Volumes[CurrentBar].GetMaximumVolume(true, out price);
          MaximumBidLine [0] = barsType.Volumes[CurrentBar].GetMaximumVolume(false, out price);

          double Value1 = MaximumAskLine [0];
          double Value2 = MaximumBidLine [0];

          double result = (Value1 - Value2);

          MaximumVolumeLine[0] = result;​

          Comment


            #6
            Hello Lopat,

            Thank you for your note.

            If you would like to make a plot a histogram instead of a line, you may choose the PlotStyle.Bar in the AddPlot() method:


            As for the index was outside the bounds of the array error, I suggest adding Print statements line by line (or every few lines) that print out different numbers. This way, you can see which was the last number to print to the NinjaScript Output window before the error and you can narrow down which line of code is causing the error. Another way to narrow down the cause would be to comment out your script and gradually uncomment different lines, recompile, and reload NinjaScript until you encounter the error again.

            Another thing to consider; are you using the volumetric bars are your primary data series on the chart this script is applied to, or are you calling AddVolumetric() and using the volumetric bars as an added series?

            I look forward to your reply.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            576 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            334 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            101 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            553 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            551 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X