Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last Price and size function

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

    Last Price and size function

    Hi

    I am able to use the MarketData function and get correct prices but am unable to obtain the last price and size using the COM Interface with VB.

    gobjNinjaClient.MarketData("6E 06-09", 1) - works

    gobjNinjaClient.Last("6E 06-09", dblPrice, intSize) - does not work

    Please does anyone know what I am doing wrong?


    Thanks

    Pobo

    #2
    Pobo,

    MarketData() is what you use to grab data. If you want to get last you just change that 1 parameter to 0.

    double MarketData(string instrument, int type)
    Gets the most recent price for the specified instrument and data type. 0 = last, 1 = bid, 2 = ask. You must first call the SubscribeMarketData() function prior to calling this function.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    93 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    31 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    34 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    70 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X