Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problem with OnMarketUpdate()

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

    Problem with OnMarketUpdate()

    Hi,

    I'm running the simple OnMarketUpdate() sample code:
    Code:
    protected override void OnMarketData(MarketDataEventArgs e)
    {
        // Print some data to the Output window
        if (e.MarketDataType == MarketDataType.Last) 
              Print("Last = " + e.Price + " " + e.Volume);
     
        else if (e.MarketDataType == MarketDataType.Ask)
             Print("Ask = " + e.Price + " " + e.Volume);
        else if (e.MarketDataType == MarketDataType.Bid)
             Print("Bid = " + e.Price + " " + e.Volume);
    }
    The problem is that some of the times it works fine and some of the times I'm not getting the Bid Quotes only Ask Quotes.
    Also sometime when I start to run the strategy I don't get any Quotes.

    Please Advice.

    Roy

    #2
    Roy, is this for all instruments / expiries you've tested on? Would the strategy have bars charted prior to enabling it? Are there any error seen in NT's log tab?

    Comment


      #3
      Hi Bertrand,

      Some time for all some time for few(I didn't recognized any specific pattern in it).
      No expires, all are running products.
      Yes I use the 1 minute bars for all instruments I add.
      No error in the log tab.

      Thanks!

      Comment


        #4
        When this occurs, can you please correlate to your Time and Sales window or the Control Center that would also be showing the Level 1 data feed for the instrument in question - would the updates come in there as you would expect? Which broker / feed is used here?

        Comment


          #5
          Hi Bertrand,

          Some time for all some time for few(I didn't recognized any specific pattern in it).
          No expires, all are running products.
          Yes I use the 1 minute bars for all instruments I add.
          No error in the log tab.

          Thanks!

          Comment


            #6
            I'm using IQFeed.
            The products I'm using are Fix Income Eurodollar spreads.
            Maybe the problem is that the price level of the bid is 0.00 this is why I'm not getting the quotes?

            Comment


              #7
              That would be very likely the reason for it - we would not support spreads unfortunately - but it's on our suggestion list for future consideration, I will add a vote in on your behalf since you asked about it.

              Comment


                #8
                Thanks.
                Can it be possible to enable 0 prices even before?

                Comment


                  #9
                  Unfortunately I would not be aware of a workaround to enable shortterm freewind for those products.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by cmoran13, 04-16-2026, 01:02 PM
                  0 responses
                  36 views
                  0 likes
                  Last Post cmoran13  
                  Started by PaulMohn, 04-10-2026, 11:11 AM
                  0 responses
                  23 views
                  0 likes
                  Last Post PaulMohn  
                  Started by CarlTrading, 03-31-2026, 09:41 PM
                  1 response
                  162 views
                  1 like
                  Last Post NinjaTrader_ChelseaB  
                  Started by CarlTrading, 04-01-2026, 02:41 AM
                  0 responses
                  96 views
                  1 like
                  Last Post CarlTrading  
                  Started by CaptainJack, 03-31-2026, 11:44 PM
                  0 responses
                  152 views
                  2 likes
                  Last Post CaptainJack  
                  Working...
                  X