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 Lele2k24, Yesterday, 11:24 AM
|
8 responses
27 views
0 likes
|
Last Post
by Lele2k24
Today, 11:00 AM
|
||
Started by Padan, Today, 02:02 AM
|
4 responses
15 views
0 likes
|
Last Post
by Padan
Today, 10:46 AM
|
||
Started by kramnor2001, Yesterday, 02:30 PM
|
4 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 10:44 AM
|
||
Started by eduardodipp7, Today, 10:29 AM
|
0 responses
2 views
0 likes
|
Last Post
by eduardodipp7
Today, 10:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
39 responses
272 views
0 likes
|
Last Post
by f.saeidi
Today, 10:23 AM
|
Comment