Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bid ask delta

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

    Bid ask delta

    Hello, I am trying to get the delta values of the volumetric bars:

    I have tried it with:

    Print("Ask for Close: " + barsType.Volumes[CurrentBar].GetAskVolumeForPrice(Close[0]));
    Print("Bid for Close: " + barsType.Volumes[CurrentBar].GetBidVolumeForPrice(Close[0]));
    Print("Volume for Close: " + barsType.Volumes[CurrentBar].GetTotalVolumeForPrice(Close[0]));
    Print("Maximum Ask: " + barsType.Volumes[CurrentBar].GetMaximumVolume(true, out price) + " at price: " + price);
    Print("Maximum Bid: " + barsType.Volumes[CurrentBar].GetMaximumVolume(false, out price) + " at price: " + price);
    Print("Maximum Combined: " + barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price) + " at price: " + price);
    but the values I get are maximum bid/ask, poc... etc...

    How can I get the bid/ask or delta of each price line that is traded on a bar?

    thank you!​

    #2
    Hello franki,

    The methods that mention "ForPrice" in their name take a price and retrieve a value. You are using the Close price in what you provided. To get the value for each price would require entering each price you wanted to know about in that method and getting the value. To do that for the whole bar would require using a for loop to loop over the prices between the high and low of a bar at the TickSize of the instrument being used. Each price looped over would be used as the input for the method with "ForPrice" in its name.

    Comment


      #3
      Is there an example in ecosystem or documentation in the user guide, ? ^^
      even if it's not from volumetrics,​

      Comment


        #4
        Hello franki,

        I am not aware of a sample that involved for the orderflow items or going over loops in that detail. You would need to research C# loops in external C# learning websites if you wanted to explore that topic in more detail. Once you are comfortable making for loops you can use the High[0] and Low[0] as the two prices to iterate between.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        78 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        40 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        54 views
        0 likes
        Last Post CarlTrading  
        Working...
        X