Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

interesting observation with bid/ask

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

    interesting observation with bid/ask

    when creating a indicator that utilizes OnMarketData(MarketDataEventArgs marketDataUpdate) method.

    Printing out the bid or ask sometimes produces a negative value X10 to the 300 value.

    example:
    2023-07-14 12:24:57:741|1|16|ASK: -1.79769313486232E+308
    2023-07-14 12:24:57:741|1|16|BID:-1.79769313486232E+308
    2023-07-14 12:24:57:808|1|16|ASK: -1.79769313486232E+308
    2023-07-14 12:24:57:808|1|16|BID:-1.79769313486232E+308
    2023-07-14 12:24:57:906|1|16|ASK: -1.79769313486232E+308
    2023-07-14 12:24:57:906|1|16|BID:-1.79769313486232E+308
    2023-07-14 12:24:57:933|1|16|ASK: -1.79769313486232E+308
    2023-07-14 12:24:57:933|1|16|BID:-1.79769313486232E+308

    Thats a bit not possible, but yet that comes directly from your platform. Am I to code around that? or are you actually going to fix it?​
    Last edited by WHICKED; 07-14-2023, 10:32 AM.

    #2
    Hello WHICKED,

    I am not able to reproduce while connected to Kinetick or NinjaTrader Brokerage using the ES 09-23 with the sample code from the help guide.

    Below is a link to a video of the test.


    How often is this occurring?

    What steps do I need to take to reproduce?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Try on NQ - put it on a 10 second chart or something along those lines.


      code being used:

      Code:
      protected override void OnMarketData(MarketDataEventArgs md)
                  if (md.Ask == null || md.Bid == null)
                      return;
                  double a=md.Ask;
                  if(a<0)
                      Log("ASK:" + a.ToString(), LogLevel.Information);
                  double b=md.Bid;
                  if(b<0)
                      Log("BID:" + b.ToString(), LogLevel.Information);
      }​

      Comment


        #4
        Hello WHICKED,

        I've tested with NQ 09-23 using the code from the help guide and am not reproducing.

        Use Print() for debugging (or write to a separate text file with StreamReader), use Log() to write information to be used by NinjaTrader Technicians in the log file.

        To confirm, you are not able to reproduce using the code from the help guide?

        You are connected to NinjaTrader Brokerage? (either live or simulation)
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          think i got it. that value is the max value of a double converted to string.
          Last edited by WHICKED; 07-14-2023, 03:30 PM.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          576 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          334 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          553 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          551 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X