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

Bid /ask Volume at High or Low of Bar

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

    Bid /ask Volume at High or Low of Bar

    Hello, I'm fairly new to programming and I am having little trouble on the last step of my indicator. I am trying to find a way to get the bid and ask volume separate on a bar high when it closes. I don't need the total volume just the high and vise versa the low depending on which way closes. Just need a little push in the right direction. Any help will be greatly appreciated. Thank you.

    #2
    Hi wint3, thanks for your post and welcome to the forum.

    A high bar or low bar can be identified like so:

    Code:
    if(Close[0] > Open[0])
    {
       //High Bar
       double HighBarVolume = Volume[0];
    }
    
    if(Close[0] < Open[0])
    {
       //Low Bar
       double LowBarVolume = Volume[0];
    }
    Please let me know if this does not resolve your inquiry.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hello Chris. Unfortunately it didn't. I uploaded a picture of a footprint chart to show what I mean. The parts I circled are the bid and ask volumes I want to be able get. Then be able to save in some separate variables to use later. Basically the bid ask/volume at a certain price level. I've been searching and I think it has something to do with OnMarketData. But I am not too familiar with process.
      Attached Files

      Comment


        #4
        Hi wint3, thanks for your reply. I understand what data you need to get now.

        Look at the "BuySellVolume" indicator for an example of this. We also have a full emulation of a price ladder in an indicator here. This read level 2 information. You would just need level 1 data, so OnMarketData will suffice rather than OnMarketDepth:



        Please let me know if you have any questions on this material.
        Chris L.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by elirion, Today, 09:32 PM
        0 responses
        2 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by cre8able, Today, 09:15 PM
        1 response
        5 views
        0 likes
        Last Post bltdavid  
        Started by cummish, Today, 08:43 PM
        0 responses
        10 views
        0 likes
        Last Post cummish
        by cummish
         
        Started by Option Whisperer, Today, 07:58 PM
        4 responses
        21 views
        0 likes
        Last Post Option Whisperer  
        Started by ETFVoyageur, 05-07-2024, 07:05 PM
        13 responses
        87 views
        0 likes
        Last Post ETFVoyageur  
        Working...
        X