Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Calculate with volumetric data

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

    Calculate with volumetric data

    Hello,

    I have 2 questions referring to volumetric bars please:

    * how can one get the information if the maximum volumetric ask of a bar is at the low of the bar please?

    With "if(Lows[0][0] == +barsType.Volumes[CurrentBars[0]].GetMaximumVolume(true,outprice)+" at price: "+price))"?

    * And is it possible to get the information how many trades occurred at bid and ask of the bar?

    Thank you!
    Tony
    Last edited by tonynt; 07-18-2021, 06:35 AM. Reason: add question

    #2
    Hello Tony,

    Thank you for your note.

    When you say 'if the bar' do you mean the current Close price?
    if (Close[0] == Low[0])

    You can get the current ask price and current bid price with GetCurrentAsk() and GetCurrentBid().
    You can get the ask / bid volume for price level with GetAskVolumeForPrice() and GetBidVolumeForPrice().
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply. There is a misunderstanding and I assume from my translation that might have caused it.
      I didnt mean if close of bar is the low of the bar (which is clear how to do).
      I wanted to ask if the maximum of asks (maximum ask number of volumetric bar) is at the low of that volumetric bar...(then set eg bool "maxaskofbarisathelow=true")

      From the helpguide I see that we get the price with highest ask number with "+barsType.Volumes[CurrentBars[0]].GetMaximumVolume(true,outprice)+" at price: "+price))""
      and I want to set eg a bool true when this price is the low of the bar.

      I hope I could explain better now what I mean.

      Thank you!
      Tony

      Comment


        #4
        Hello Tony,

        To confirm, you want to loop from the high to low to find the highest volume value, once the highest value is found you want to compare that price to be equal to the Low[0]?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hello,
          thank you for your reply. Yes this is what I need.
          But I had not thought to start another calculation process in an indicator or strategy as I thought from the "basic syntax" I saw in helpguide with "+barsType.Volumes[CurrentBars[0]].GetMaximumVolume(true,outprice)+" at price: "+price))" that this is giving the price with highest asknumber, no? Why do we need another loop (CPU PC) through the bar when from this snippet there is the price for maxask already? I thought one needs only to check if this price is the low or high of bar. Is my understanding wrong?

          Thank you!
          Tony

          Comment


            #6
            Hello Tony,

            Is GetMaximumVolume() providing the value you need and resolving your inquiry?
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by RubenCazorla, 08-30-2022, 06:36 AM
            3 responses
            77 views
            0 likes
            Last Post PaulMohn  
            Started by f.saeidi, Yesterday, 12:14 PM
            9 responses
            23 views
            0 likes
            Last Post f.saeidi  
            Started by Tim-c, Today, 03:54 AM
            0 responses
            3 views
            0 likes
            Last Post Tim-c
            by Tim-c
             
            Started by FrancisMorro, Today, 03:24 AM
            0 responses
            4 views
            0 likes
            Last Post FrancisMorro  
            Started by Segwin, 05-07-2018, 02:15 PM
            10 responses
            1,772 views
            0 likes
            Last Post Leafcutter  
            Working...
            X