Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OnMarketData

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

    OnMarketData

    Hello,

    I always receive twice MarketDataType == Last event.

    protected override void OnMarketData(MarketDataEventArgs e)
    {
    if (e.MarketDataType != MarketDataType.Last) return;


    Print("MarketDataType = " + e.MarketDataType + " price: " + e.Price + " vol " + e.Volume);

    }

    Output Windows:

    MarketDataType = Last price: 190.19 vol 100
    MarketDataType = Last price: 190.19 vol 100
    MarketDataType = Last price: 190.18 vol 100
    MarketDataType = Last price: 190.18 vol 100
    MarketDataType = Last price: 190.17 vol 100
    MarketDataType = Last price: 190.17 vol 100
    MarketDataType = Last price: 190.18 vol 100
    MarketDataType = Last price: 190.18 vol 100
    MarketDataType = Last price: 190.18 vol 200
    MarketDataType = Last price: 190.18 vol 200
    MarketDataType = Last price: 190.18 vol 121400
    MarketDataType = Last price: 190.18 vol 121400

    sincerely,Kobi

    #2
    Hello,

    Thank you for the question.

    Based on the output, it would appear you are using two series is this correct? If so this would be expected, there is an example that shows how to determine which is being called here: http://ninjatrader.com/support/forum...d.php?p=423923

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by SalmaTrader, 07-07-2026, 10:26 PM
    0 responses
    24 views
    0 likes
    Last Post SalmaTrader  
    Started by CarlTrading, 07-05-2026, 01:16 PM
    0 responses
    14 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 06-17-2026, 10:32 AM
    0 responses
    9 views
    0 likes
    Last Post CaptainJack  
    Started by kinfxhk, 06-17-2026, 04:15 AM
    0 responses
    10 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Started by kinfxhk, 06-17-2026, 04:06 AM
    0 responses
    17 views
    0 likes
    Last Post kinfxhk
    by kinfxhk
     
    Working...
    X