Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

access Time&Sale info from a strategy

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

    access Time&Sale info from a strategy

    Hi,I want to know how I can access Time&Sale info from a strategy.
    Do have an example ??
    Thank you,
    Michael

    #2
    Hello,

    You would need to use OnMarketData() to access this information:



    We do not have an example pertaining to a strategy, however there is an indicator reference sample on Creating your own Level II data book (Accessing market depth):

    MatthewNinjaTrader Product Management

    Comment


      #3
      time & sale info from a strategy

      protectedoverridevoid OnMarketData(MarketDataEventArgs e){
      // Print some data to the Output window
      if (e.MarketDataType == MarketDataType.Last)
      Print(Time[0] + "\t" + "Last = " + e.Price + "\t" + "v= " + e.Volume);
      elseif (e.MarketDataType == MarketDataType.Ask) Print(Time[0] + "\t" + "Ask = " + e.Price + "\t" + "v= " + e.Volume);
      elseif (e.MarketDataType == MarketDataType.Bid)
      Print(Time[0] + "\t" + "Bid = " + e.Price + "\t" + "v= " + e.Volume);
      }
      }

      Please respond :
      MarketDataType.Ask/Bid/Last
      1. So Here Ask indicates volume/price the market maker willing to buy ??
      2. So Here Bid indicates volume/price the market maker willing to sell ??

      3. Last indicates actual trades volume/price ??. It is true ??

      4. How to determine AsAsk -- buys or asBid --sells

      Thank you for your support

      Michael,

      Comment


        #4
        Hello,

        1 - correct
        2 - correct
        3 - correct
        4 - Unfortunately there is no way to tell directly from market depth (level II) if these are buys or sells.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        67 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        36 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        60 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        62 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X