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
How do I get the volume at price?
Collapse
X
-
How do I get the volume at price?
I want to make something automated to get the volume at the current price and then based on the volume, it would enter into a long or short trade. Is there a way to do this? For example, if the price of the YM is trading at 24000, the bid volume is 24 and ask is 7, I want to enter a long trade.Tags: None
-
Hello jertrade,
Thanks for your post.
You could use OnMaketData and track the volume that comes in for each Bid and Ask update. This will tell you the current volume for Bid/Ask as it comes in. You could then add your trading logic within OnMarketData to enter off of these signals since the Bid/Ask will update more frequently here than using OnBarUpdate to trigger your order submissions.
The documentation page below provides some sample code for displaying the bid ask and last volume.
Please let us know if there is anything else we can do to help.JimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AaronKoRn, Today, 09:49 PM
|
0 responses
11 views
0 likes
|
Last Post
by AaronKoRn
Today, 09:49 PM
|
||
Started by carnitron, Today, 08:42 PM
|
0 responses
10 views
0 likes
|
Last Post
by carnitron
Today, 08:42 PM
|
||
Started by strategist007, Today, 07:51 PM
|
0 responses
11 views
0 likes
|
Last Post Today, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,980 views
3 likes
|
Last Post
by jhudas88
Today, 06:59 PM
|
||
Started by rbeckmann05, Today, 06:48 PM
|
0 responses
9 views
0 likes
|
Last Post
by rbeckmann05
Today, 06:48 PM
|
Comment