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 trilliantrader, Today, 03:01 PM
    0 responses
    1 view
    0 likes
    Last Post trilliantrader  
    Started by pechtri, 06-22-2023, 02:31 AM
    9 responses
    122 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by frankthearm, 04-18-2024, 09:08 AM
    16 responses
    67 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by habeebft, Today, 01:18 PM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by benmarkal, Today, 12:52 PM
    2 responses
    19 views
    0 likes
    Last Post benmarkal  
    Working...
    X