Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Volumetric MaxVolume Bar Data

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

    Volumetric MaxVolume Bar Data

    Hi,

    I've been able to figure out how to print the maximum value of both the bid and ask volume and it's price on a volumetric bar with this code below in teal. Since I now know that it's possible to get that information drawn, I'd like to get that price into a strategy where the maximum volume price level is what is looked at in the logic. How can I get the strategy to look at just the price level (not the volume) and uses something like this: if (GetMaximumVolume(null, out price)[0] > GetMaximumVolume(null, out price)[1])

    Does that make sense what I'm trying to do?

    Thanks,
    Jack

    try
    {
    double price;

    Draw.Text(this, "test1" +CurrentBar, "" + barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price) + " " + price, 0, High[0] + 8 +TickSize);

    //GetMaximumVolume(null, out price)[0] = barsType.Volumes[CurrentBar].GetMaximumVolume;
    }
    catch{}

    #2
    Hi Seastragg, thanks for posting.

    GetMaximumVolume is the correct method to use for getting the price level where the max volume occurred in a given bar. E.g.

    Code:
    double price1, price2;
    
    barsType.Volumes[CurrentBar].GetMaximumVolume(null, out price1);
    barsType.Volumes[CurrentBar-1].GetMaximumVolume(null, out price2);
    
    if(price1 > price2)
    {
        Print("signal");
    }
    Best regards,
    -ChrisL
    Last edited by NinjaTrader_ChrisL; 12-17-2021, 12:24 PM.

    Comment


      #3
      Hi Chris,

      is the ">" that you have there supposed to be a > ?

      Also, instead of print, can it be turned into a true false statement?

      Cheers,
      Jack

      Comment


        #4
        Hi Jack,
        That's correct, the forum turned my > to a code. That is a boolean statement that can be used in a condition. I just added the Prints because it's always helpful to use prints to see the data coming from the strategy. I fixed the code above.

        Best regards,
        -ChrisL

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Today, 05:17 AM
        0 responses
        39 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