• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Level 2 Bid minus Ask Data

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

  • clubfoot
    started a topic Level 2 Bid minus Ask Data

    Level 2 Bid minus Ask Data

    I was curious if anyone knows if this is possible on how to create something very simple like the following.



    Essentially what I am looking for is to get the data from the Level 2 indicator and take the total from the buy side and the total from the sell side and minus them. Looking at the screen shot I am taking the 2692-2500 = 192 and plotting that with a print on the side. Is this possible? I've tried to find the Level 2 indicator in the indicator editor but it doesn't seem to exist.

  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the post.

    I wanted to confirm, is this question related to this post? I am unable to see where limit orders have been discussed in this thread, was this question intended for another post?

    I look forward to being of further assistance.

    Leave a comment:


  • chrinist
    replied
    hello, did you ever get a answer to the above question regarding the limit orders showing up on the chart? I am looking for something like this... thanks

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    This example does not display anything on the chart and will only print the level 2 book depending on the condition that is defined in OnBarUpdate.

    If you look in the code there is a comment stating when the book would be printed to the output window or:

    // When the Close price crosses over the SMA, print the L2 books.
    if (CrossAbove(Close, SMA(5), 1))
    {

    You can comment this out if you just want to see the book right away. The example is just meant to show how you can combine conditions while using the L2 book.

    Most of the reference examples are meant for you to go through the code its self to learn from, many of them will only print to the output window.

    I look forward to being of further assistance.

    Leave a comment:


  • clubfoot
    replied
    For some reason the SampleMarketDepth doesn't actually load anything onto my chart. I also can't even get anything to display in the output window data box.

    Is there another one I should check that actually works?

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Without the visuals that would be much easier, mainly you would just need to come up with the formula using NinjaScript and ensure it calculates as you expect.

    This can be done using simple Print() statements and the Tools -> Output window to check your output data.

    You could take a look at this example we have on creating a custom level 2 book : http://www.ninjatrader.com/support/f...ead.php?t=3478

    This shows how to use the OnMarketDepth method and has some helpful items that show the ways to get the data.

    I look forward to being of further assistance.

    Leave a comment:


  • clubfoot
    replied
    What about if I did not want the level 2 visuals at all? I just want the math done which minuses it and prints that out?

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    Hello,

    Thank you for the question.

    This would be possible to create using an indicator, although would not necessarily be simple to create.

    The hardest part would be creating the visual levels as you see on the screen. I would suspect this image is taking use of the plot override in NinjaScript which allows you to draw on the screen using the C# Graphics.

    This would be more of an advanced programming task to complete exactly how you see in the image.

    If you would like to attempt this yourself then I can provide you with some resources that use the plot override so you can see how it is used, other than that there would not really be any documentation on this because it is an advanced programming item.

    I look forward to being of further assistance.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by tdawson11, Today, 07:48 AM
0 responses
2 views
0 likes
Last Post tdawson11  
Started by pstrusi, Today, 07:39 AM
0 responses
4 views
0 likes
Last Post pstrusi
by pstrusi
 
Started by vantojo, 06-19-2019, 04:06 PM
6 responses
34 views
0 likes
Last Post vantojo
by vantojo
 
Started by Mike661, Today, 07:22 AM
0 responses
7 views
0 likes
Last Post Mike661
by Mike661
 
Started by hothomas, Today, 07:17 AM
1 response
7 views
0 likes
Last Post hothomas  
Working...
X