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 SalmaTrader, 07-07-2026, 10:26 PM
        0 responses
        47 views
        0 likes
        Last Post SalmaTrader  
        Started by CarlTrading, 07-05-2026, 01:16 PM
        0 responses
        22 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 06-17-2026, 10:32 AM
        0 responses
        15 views
        0 likes
        Last Post CaptainJack  
        Started by kinfxhk, 06-17-2026, 04:15 AM
        0 responses
        21 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Started by kinfxhk, 06-17-2026, 04:06 AM
        0 responses
        23 views
        0 likes
        Last Post kinfxhk
        by kinfxhk
         
        Working...
        X