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 alifarahani, Today, 09:40 AM
    6 responses
    38 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    18 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    15 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X