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 algospoke, Yesterday, 06:40 PM
|
2 responses
23 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
15 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
46 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
23 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
181 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment