Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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?
    BertrandNinjaTrader Customer Service

    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?
        BertrandNinjaTrader Customer Service

        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.
              BertrandNinjaTrader Customer Service

              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.
                  BertrandNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by pibrew, Today, 06:37 AM
                  0 responses
                  0 views
                  0 likes
                  Last Post pibrew
                  by pibrew
                   
                  Started by rbeckmann05, Yesterday, 06:48 PM
                  1 response
                  12 views
                  0 likes
                  Last Post bltdavid  
                  Started by llanqui, Today, 03:53 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post llanqui
                  by llanqui
                   
                  Started by burtoninlondon, Today, 12:38 AM
                  0 responses
                  11 views
                  0 likes
                  Last Post burtoninlondon  
                  Started by AaronKoRn, Yesterday, 09:49 PM
                  0 responses
                  15 views
                  0 likes
                  Last Post AaronKoRn  
                  Working...
                  X