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!
See more
See less

Partner 728x90

Collapse

Questions about MarketDataEventArgs

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

    Questions about MarketDataEventArgs

    I read this webpage:


    Let me build a fake market environment first, because it is easier for us to communicate.

    there is a moment
    time: 10:10:10 am
    ask price: $10
    bid price: $9
    there are three people, one is buyer, one is seller and me. at this exactly moment, i pay $11 to buy stock, position is 1 share then
    the sequence of OnMarketData that I guess is

    Event1: MarketDataEventArgs.MarketDataType is MarketDataType.Ask
    MarketDataEventArgs.Ask is $10
    MarketDataEventArgs.Bid is $9
    MarketDataEventArgs.Volume is 1
    MarketDataEventArgs.Price is $11
    MarketDataEventArgs.Time is 10:10:10 am

    Event 2: MarketDataEventArgs.MarketDataType is MarketDataType.Last
    MarketDataEventArgs.Ask is $10
    MarketDataEventArgs.Bid is $9
    MarketDataEventArgs.Volume is 1
    MarketDataEventArgs.Price is $11
    MarketDataEventArgs.Time is 10:10:10 am

    Q1: is the sequence and values correct?
    Q2: what if the event MarketDataType.Bid? do not happen?
    Q3: is there a document to explan every value of MarketDataEventArgs.MarketDataType?

    Thanks

    #2
    Hello UMLer,

    Thank you for your post.

    If Last is greater than Ask, it is a buy. It is plausible that the Last tick from Event 2 would be your theoretical buy.

    Bid Ask and Last are all separate feeds. Last ticks represent actual trades. There does not have to be a sequence of Bids/Asks before a Last trade is seen.

    All possible MarketDataTypes are listed in our help guide here: https://ninjatrader.com/support/help...aeventargs.htm

    It should be noted that not every provider will support all MarketDataTypes.

    Please let us know if we may be of further assistance to you.

    Kate W.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by adeelshahzad, Today, 03:54 AM
    4 responses
    25 views
    0 likes
    Last Post adeelshahzad  
    Started by merzo, 06-25-2023, 02:19 AM
    10 responses
    823 views
    1 like
    Last Post NinjaTrader_ChristopherJ  
    Started by frankthearm, Today, 09:08 AM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by jeronymite, 04-12-2024, 04:26 PM
    3 responses
    43 views
    0 likes
    Last Post jeronymite  
    Started by yertle, Today, 08:38 AM
    5 responses
    16 views
    0 likes
    Last Post NinjaTrader_BrandonH  
    Working...
    X