Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How do I get the volume at price?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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.

    #2
    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.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    54 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    130 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    72 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    44 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    49 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X