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

how can one get the maximum tickvalue of a bar please

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

    how can one get the maximum tickvalue of a bar please

    Hello,

    how can one get the maximum tickvalue of a bar please, or if this is not possible the maximum trades of a volumetric bar and the price please?
    Like "Maximum Ask: "+barsType.Volumes[CurrentBar].GetMaximumVolume(true,outprice)+" at price: "+price;
    But instead the maxvolume the maxtrades and the price.

    Thank you!
    Tony

    #2
    Hello Tony,

    What do you consider the maximum tickvalue?

    Do you mean the highest price reached? (High[0])

    Do you mean the TickSize?

    Do you mean the Volume[0]?


    With the Voumetric bar type the values available are listed in the help guide linked below.


    There is not a maximum number of trades, as I am not aware of any way to determine trades from tick data which includes volume and price only. Tick data does not have a trade count.
    The GetMaximumVolume() will return the maximum volume for the bar.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      thank you for your reply.

      I´m working with the values available from that link. But I would need to get the maximum trades (in volumetric dataseries) or the maximum ticks in eg 1 minute dataseries and the price where the maximum ticks (or trades) occurred. This is possible in another platform used in a trading room, so I want to as when "...max volume ... at price..." is available if then could be available also " ...max trades....at price...." so that I have the same information as the fellows in the room with other platform.

      If this is not possible then I have to work with sizefilter in volumetric dataseries (but when sizefilter in volumetric dataseries is possible then the "...max trades....at price..." should also be possible, no?

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt,

        Thank you for your reply.

        We would recommend using a Dictionary<double, long> or Dictionary<double, double> to track how many ticks occur at a specific level. <Price, Volume>

        You can use OnMarketData to track MarketDataType.Last ticks, and each time there is a tick, check if the price level exists in the dictionary, and add the price if it is not there, and if it is there, increment the volume at that specific price.

        The attached example should give you a starting point for getting the volume in OnMarketData.

        Please let us know if we may be of further assistance to you.
        Attached Files
        Kate W.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,609 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        16 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X