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.
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!
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
NinjaTrader
Level 2 Bid minus Ask Data
Collapse
X
-
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.Tags: None
-
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.JesseNinjaTrader Customer Service
-
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.JesseNinjaTrader Customer Service
Comment
-
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.JesseNinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AdamDJ8, Today, 09:18 PM
|
0 responses
2 views
0 likes
|
Last Post
by AdamDJ8
Today, 09:18 PM
|
||
Started by knowmad, Today, 03:52 AM
|
2 responses
26 views
0 likes
|
Last Post
by knowmad
Today, 09:03 PM
|
||
Started by ETFVoyageur, Today, 07:05 PM
|
0 responses
8 views
0 likes
|
Last Post
by ETFVoyageur
Today, 07:05 PM
|
||
Started by Orion815, 05-02-2024, 08:39 AM
|
2 responses
18 views
0 likes
|
Last Post
by Orion815
Today, 06:24 PM
|
||
Started by suroot, 02-25-2017, 04:43 AM
|
11 responses
2,554 views
0 likes
|
Last Post
by Zilvercat
Today, 05:36 PM
|
Comment