Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Market Data Update Last Executed

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

    Market Data Update Last Executed

    Hello,
    I was wondering if when i am herfe:
    Code:
    [B]protected override void OnMarketData(MarketDataEventArgs marketDataUpdate)
    {
    if(marketDataUpdate.MarketDataType == MarketDataType.Last)
    {
    
    
    }
    }[/B]
    I was wondering what is the data actually about.
    when i receive a type of Last, is it the last execution?
    if yes, how can i understand if it executed a market order against the ask or the bid?
    Also, if i receive a type of 'ask' what does i mean? Is it un update on just for top of the book?

    I would like to understand better the behaviour of these parameters since i'm running a strategy that is based on the last executed trade in the market.
    thanks

    #2
    Hello StefanoMuscariello,

    Thank you for your post and welcome to the NinjaTrader forum community!

    The last executed trade in the market drives the last price, so to answer your first question, yes the Last price type is the last execution. The bid and ask prices are the best potential price that could be bought/sold at any point in time. The bid price is an update for the highest price a buyer is willing to pay and the ask price is an update for the lowest price a seller is willing to sell at. I suggest reviewing the BuySellVolume indicator that comes with NinjaTrader; it compares the last price to see if it is greater than/equal to the ask or less than/equal to the bid to determine if that last trade was a buy or a sell.

    For more information about bid vs. ask vs. last, there are some publicly available resources such as the following:For more notes and tips related to OnMarketData() please see the help guide page here:Please let us know if we may be of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, Today, 05:17 AM
    0 responses
    52 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
    70 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