Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OrderFlow - Ratio Bounds Low & High

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

  • NinjaTrader_Jim
    replied
    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.

    Leave a comment:


  • toocool7610
    replied
    well i am brand new to ninjatrader , can anyone please post the code please

    thanks

    Leave a comment:


  • dlshepjr
    replied
    Thanks Jim D for the explanation.

    Leave a comment:


  • Trader17
    replied
    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?

    Leave a comment:


  • M.elShafey
    replied
    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:	2377
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

    Leave a comment:


  • M.elShafey
    replied
    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

    Leave a comment:


  • NinjaTrader_Jim
    replied
    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

    Leave a comment:


  • dlshepjr
    replied
    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.

    Leave a comment:


  • Trader17
    replied
    Originally posted by Chessdweeb View Post
    Hello again Cyanez,

    Honestly I do not use the ratio. I prefer trading stacked imbalances, single prints and high percentage delta moves. Very rarely do I wait for a bar to close to gather the information to enter a trade or exit a trade.

    In theory there are three types of ratios.

    1-Neutral
    2-High
    3-Low

    Neutral is a number between 29 and .71 indicating that the market is trading normal and balanced.

    High is a number over 30 indicating price rejection.

    Low is a number between .70 and 0.0 which indicates price being defended.

    The purpose of the ratio is to is to help determine key reversal areas.

    Hopefully this helps.
    What is a high percent delta?
    Thanks.

    Leave a comment:


  • Trader17
    replied
    Sorry not stacked. Use the upper 2 and lower 2 levels and just divide them. And those are the ratios.

    Leave a comment:


  • dlshepjr
    replied
    Trader17 you mentioned that you have the ratio bound numbers calculated. Would you mind sharing the code because I am having trouble getting the stacked volumes? Thanks

    Leave a comment:


  • Trader17
    replied
    Just divide the stacked volumes on either side of the rack.

    Leave a comment:


  • Tradereb
    replied
    Chessdweeb, do you have any guidance or feedback on how to get these ratio bound numbers coded into ninjatrader8?

    Leave a comment:


  • Trader17
    replied
    Originally posted by Chessdweeb View Post
    Hello again Cyanez,

    Honestly I do not use the ratio. I prefer trading stacked imbalances, single prints and high percentage delta moves. Very rarely do I wait for a bar to close to gather the information to enter a trade or exit a trade.

    In theory there are three types of ratios.

    1-Neutral
    2-High
    3-Low

    Neutral is a number between 29 and .71 indicating that the market is trading normal and balanced.

    High is a number over 30 indicating price rejection.

    Low is a number between .70 and 0.0 which indicates price being defended.

    The purpose of the ratio is to is to help determine key reversal areas.

    Hopefully this helps.
    How do you use stacked imbalances?
    Thanks.

    Leave a comment:


  • Trader17
    replied
    I have the ratio bound numbers coded in Ninja Trader 8.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by andrewtrades, Today, 04:57 PM
1 response
5 views
0 likes
Last Post NinjaTrader_Manfred  
Started by chbruno, Today, 04:10 PM
0 responses
3 views
0 likes
Last Post chbruno
by chbruno
 
Started by josh18955, 03-25-2023, 11:16 AM
6 responses
436 views
0 likes
Last Post Delerium  
Started by FAQtrader, Today, 03:35 PM
0 responses
7 views
0 likes
Last Post FAQtrader  
Started by rocketman7, Today, 09:41 AM
5 responses
19 views
0 likes
Last Post NinjaTrader_Jesse  
Working...
X