Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderFlow - Ratio Bounds Low & High

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

    #16
    Hello dlshepjr,

    You can loop through the price levels of the bar by tick size to get the highest and lowest price levels of the bar, then you can use VolumetricBars' GetAskVolumeForPrice and GetBidVolumeForPrice to get the bid/ask volume of those price levels.


    Looping through price levels of a bar, from low to high:

    Code:
    for (double rowPrice = Low[0]; rowPrice <= High[0]; rowPrice += TickSize)
    Looping through price levels of a bar, from high to low:

    Code:
    for (double rowPrice = High[0]; rowPrice >= Low[0]; rowPrice -= TickSize)
    You could limit the loop to check 2 price levels if you do the following:

    Looping through price levels of a bar to get the bottom 2 price levels, from low to high:

    Code:
    for (double rowPrice = Low[0]; rowPrice <= Low[0] + TickSize; rowPrice += TickSize)
    Volumetric Bars Data Access methods can be found here - https://ninjatrader.com/support/help...tric_bars2.htm

    As this thread was opened in our Platform Technical Support forum, we ask that if you have any other NinjaScript related questions, to open a thread in the NinjaScript Indicator Development or Strategy Development forums if you have additional NinjaScript questions.
    Last edited by NinjaTrader_Jim; 11-03-2021, 02:35 PM. Reason: typo
    JimNinjaTrader Customer Service

    Comment


      #17
      Hello Cyanez Cyanez and everyone,
      Please what are doing in the ratio matter? do you find a representation for it in the order Flow chart? in my own simple knowledge is it not included in ninjatrader packs
      Thanks

      Comment


        #18
        Originally posted by Chessdweeb View Post
        Hello Cyanez,

        The calculation for Ratio Bounds is actually pretty simple. Explaining it, not so much.

        For a SELL/DOWN bar: You take the two highest price volume records in a bar ON THE BUY/UP side and divide the second place price volume by the first place price volume. It's the opposite for a BUY/UP bar. See the attached example. 743/200 = 3.715

        Hope this helps!
        Click image for larger version

Name:	Orderflows ratios.jpg
Views:	2379
Size:	187.8 KB
ID:	1061006
        yes, Chessdweeb it is simple and important but notice that it must be a blue colour ratio in the case of having a bullish reversal and the last volume traded in a bar is less than 10 in the bid side.
        and likely in a bearish reversal but in the offer side. if i have something wrong in my view please correct.
        and please what is that add on tools to get this order flow chart with ratio?
        Thanks

        Comment


          #19
          Originally posted by dlshepjr View Post
          Trader17, thanks for the feedback. But part of my issue is that I’m having a hard time getting the 2 levels for the low and the upper. I’m familiar with the max/min for the bar, but not sure how to code to get these two levels. Any help would be much appreciated.
          Jim D explained it. Can you do it now?

          Comment


            #20
            Thanks Jim D for the explanation.

            Comment


              #21
              well i am brand new to ninjatrader , can anyone please post the code please

              thanks

              Comment


                #22
                Welcome to the forums toocool7610!

                We do not have any example code for this exact purpose, it would have to be written, and the direction from post #16 could be used as a starting point if someone wanted to look at each bid/ask price and volume to develop the ratio bounds calculation.

                We will leave the thread open for other community feedback incase another member has some pre-written code, or knows of an available script that performs the task.
                JimNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by AveryFlynn, Today, 04:57 AM
                0 responses
                3 views
                0 likes
                Last Post AveryFlynn  
                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
                5 views
                0 likes
                Last Post FrancisMorro  
                Working...
                X