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 Option Whisperer, Today, 09:55 AM
                  1 response
                  11 views
                  0 likes
                  Last Post bltdavid  
                  Started by port119, Today, 02:43 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post port119
                  by port119
                   
                  Started by Philippe56140, Today, 02:35 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Philippe56140  
                  Started by 00nevest, Today, 02:27 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post 00nevest  
                  Started by Jonafare, 12-06-2012, 03:48 PM
                  5 responses
                  3,986 views
                  0 likes
                  Last Post rene69851  
                  Working...
                  X