How to make an indicator using ninja script that when there are X contracts missing for a price level then executes a market buy order.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Reading contract numbers by price levels
Collapse
X
-
Reading contract numbers by price levels
Hello friends,
How to make an indicator using ninja script that when there are X contracts missing for a price level then executes a market buy order.Tags: None
-
Hello Rheiverson,
Thank you for your post.
What are you referring to as "X contracts missing?" How do you plan to calculate/determine the contract amount and what contracts are considered to be missing? Also, do you plan to do this from an indicator or from a strategy script? You refer to indicator and posted this in the indicator development thread, though executing a market buy order would typically be done in a strategy unless you plan to utilize the Account class and submit orders from an indicator script. Please clarify and provide an example of what you are looking for so I may better understand and assist you.
I look forward to your clarification.
-
Comment
-
Hello,Originally posted by Rheiverson View PostIn example for image price is 4774,00 To move up to the next level you will have to consume the remaining 78 contracts. I want you to make a market purchase when there are less than 5 contracts left at this level.
Thank you for your reply.
The values you are referring to in the SuperDOM, such as the 78 contracts, require Level II data. We have a reference sample of how to create your own level II data book by accessing market depth in an indicator here:
You could expand on this idea to create conditions that place a market order when a certain amount of market depth is detected.
Please let us know if we may be of further assistance.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
51 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
31 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|
||
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
165 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
100 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
160 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|

Comment