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

Q about OMD

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

    Q about OMD

    I run a custom indicator that references L2 data in OMD. It goes to each price level, calculates, using bid/ask, and holds my calculated value, goes to the next price level, does the same until the bar completes, then goes to OBU, where I have a variable that calls this value for the bar. I use calc on bar close, tick charts and don't use tick replay. Everything works fine.

    What I want to do but don't know how is isolate my calculated value in a specific price level, assign this to an OMD variable, then, in OBU, assign this to a different variable and call it--just like I do for the bar, but for the price level.

    For example, if a bar had 10 price levels, 1 being highest and 10 being lowest, I could identify my value in any one of those 10 bid price levels and 10 ask price levels and know where it occurs in the bar.

    Is there a function that can help me do this? Can I get an example, place to look, etc.?

    Thank you.

    #2
    Hello imalil,

    Thank you for your note.

    There is a reference example Creating your own Level II data book which demonstrates getting the values of the book.


    I have modified the above example to show how to store the volume values when the ask equals a specific price. With this method you are able to go back and reference x bars ago.

    Please let us know if you need further assistance.
    Attached Files
    Last edited by NinjaTrader_AlanP; 01-10-2017, 02:58 PM.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by algospoke, Yesterday, 06:40 PM
    2 responses
    19 views
    0 likes
    Last Post algospoke  
    Started by ghoul, Today, 06:02 PM
    3 responses
    14 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    45 views
    0 likes
    Last Post jeronymite  
    Started by Barry Milan, Yesterday, 10:35 PM
    7 responses
    21 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by AttiM, 02-14-2024, 05:20 PM
    10 responses
    181 views
    0 likes
    Last Post jeronymite  
    Working...
    X