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 charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        61 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        148 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        162 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        98 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        286 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X