Announcement

Collapse
No announcement yet.

Bid and ask prices ZERO

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

  • Bid and ask prices ZERO

    beta v7.7 build 653

    I get both bid and ask values sporadically set to ZERO. How should I interpret this?

    See this output in xml format with a couple of samples.

    Data from AB #F on Globex

    Log: <tick><bar>false</bar><price>529.4</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>

    Log: <tick><bar>false</bar><price>529.6</price><bid>529.4</bid><ask>0</ask></tick>

    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.6</price><bid>529.5</bid><ask>529.6</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.5</bid><ask>529.6</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>false</bar><price>529.5</price><bid>529.5</bid><ask>529.6</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.4</bid><ask>529.5</ask></tick>
    Log: <tick><bar>true</bar><price>529.3</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.2</price><bid>529.2</bid><ask>529.3</ask></tick>

    Log: <tick><bar>false</bar><price>529.1</price><bid>0</bid><ask>529.3</ask></tick>

    Log: <tick><bar>false</bar><price>529.2</price><bid>529.1</bid><ask>529.2</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.2</bid><ask>529.3</ask></tick>
    Log: <tick><bar>false</bar><price>529.2</price><bid>0</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.2</bid><ask>529.3</ask></tick>
    Log: <tick><bar>false</bar><price>529.4</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.3</price><bid>529.3</bid><ask>529.4</ask></tick>
    Log: <tick><bar>false</bar><price>529.2</price><bid>529.2</bid><ask>529.3</ask></tick>
    Log: <tick><bar>false</bar><price>529.1</price><bid>529.1</bid><ask>529.2</ask></tick>
    Log: <tick><bar>false</bar><price>529</price><bid>529</bid><ask>529.2</ask></tick>
    Log: <tick><bar>false</bar><price>529.1</price><bid>529</bid><ask>529.1</ask></tick>

  • #2
    Data feed issue?

    This has become quite a serious problem for me, so I'd like to know the status of this issue. When bid and/or ask are invalid, I must discard data for the trade because I cannot perform my analysis.

    This apears on YM, AB on Globex, and probably many others.

    Can someone explain what is happening here, and how it can be addressed? Is it a data feed issue?

    TIA

    Comment


    • #3
      Code to reproduce

      /*
      * bidAskBug.efs
      * prints when invalid bid or ask
      */

      function preMain() {
      setPriceStudy(true);
      }

      function main() {
      if (getCurrentBarIndex()<-1) return;
      var bid=getMostRecentBid();
      var ask=getMostRecentAsk();
      var bidAskError=false;
      if (bid==null || bid==0) bidAskError=true;
      if (ask==null || ask==0) bidAskError=true;
      if (!bidAskError) return;
      // else print the offending data values
      debugPrintln("Error! bid:"+bid+" ask:"+ask);
      }

      Comment


      • #4
        I did a search in Time & Sales on AB #F for any Bids or Asks < 100 (i.e. looking for zeroes), and I saw none. This indicates that the zeroes aren't coming across the feed, and this may be an EFS issue. I'm going to move the thread to the EFS Studies forum with the thought that someone over there may have seen this in the past and can comment better than I.
        Regards,
        Jay F.
        Product Manager
        _____________________________________
        Have a suggestion to improve our products?
        Click Support --> Request a Feature in eSignal 11

        Comment


        • #5
          Good work! Would be nice if it were fixable on the software side.
          TIA

          Comment


          • #6
            Hello bfry,

            This problem came up a couple months ago and was fixed. See this thread. The problems appears to be back. I've alerted the appropriate people. Hopefully we can get this corrected soon.
            Jason K.
            Project Manager
            eSignal - an Interactive Data company

            EFS KnowledgeBase
            JavaScript for EFS Video Series
            EFS Beginner Tutorial Series
            EFS Glossary
            Custom EFS Development Policy

            New User Orientation

            Comment


            • #7
              What is the status of this? Is it fixed in the latest build?

              Comment


              • #8
                Hello bfry,

                This problem is not build specific and it seems to be a different problem than what was encountered a couple months ago. The problem is with the data feed or the processing of the data. There are some other B/A issues currently being worked on that may be related to the EFS B/A zero problem. I'm trying to get some more info on this.

                For now, use some global variables to track the most recent B/A values. If a zero B/A value is detected, don't allow the globals to be updated. I assume you're already doing something like this, but just in case you weren't, this should get you around the problem. However, there is the possibility that your globals could reflect a crossed market. Let me know if that occurs.
                Jason K.
                Project Manager
                eSignal - an Interactive Data company

                EFS KnowledgeBase
                JavaScript for EFS Video Series
                EFS Beginner Tutorial Series
                EFS Glossary
                Custom EFS Development Policy

                New User Orientation

                Comment


                • #9
                  Hi Jason,
                  I don't use globals, but variables "global" to the efs module at the outer level (probably what you meant).

                  I set a "lastValidBid" and "lastValidAsk" variable. So, yes, I do that already, thanks.

                  Problem is that I can't evaluate data on that tick if I don't get valid bid/ask information so my running statistics are wrong...

                  Thanks!

                  Comment


                  • #10
                    Hello bfry,

                    I've received some information for our QA department in regards to the zero bid/ask issue with electronically traded instruments. In summary:

                    There will be legitimate times when there is no valid bid or ask. It's incorrect to assume that there will always be a current bid and ask price on the electronically traded contracts. For actively traded contracts, the no-quote, or zero bid/ask condition, should never persist for more than a fraction of a second. The reason this happens is because the exchange clears the quotes in order to prevent stale quotes.

                    According to the programmers, we’ve been running under the same rules for this for the past two years. We should have been seeing this occasional zero as long as we’ve had the getMostRecentBid/Ask() functions. Can you say with certainty that these functions always returned a valid price prior to the bid/ask zero problems we encountered a couple months ago?

                    Using the work-around I provided in my last post is what you'll need to use for now. It would give you the same result as if the quotes were not being cleared, which would be the most recent bid or ask price. You should be able to continue to analyze each trade as needed.
                    Jason K.
                    Project Manager
                    eSignal - an Interactive Data company

                    EFS KnowledgeBase
                    JavaScript for EFS Video Series
                    EFS Beginner Tutorial Series
                    EFS Glossary
                    Custom EFS Development Policy

                    New User Orientation

                    Comment


                    • #11
                      I am referring to AB (ER2) on Globex.

                      I get literally hundreds or thousands of invalid bids and or asks.

                      This definitely does not happen with nearly the same frequency when the system works correctly.

                      So, yes, there has been a change, and it needs to be fixed somewhere in the chain.

                      Comment


                      • #12
                        I'm still getting hundreds of these even in low volume conditions trading ER2 (AB #F) on Globex. Isn't there any way this can be fixed? I need to know whether the trade was at the bid or ask. TIA

                        Comment


                        • #13
                          Hello bfry,

                          Using the work-around I provided previously to suppress the zeros by using global variables is what you'll need to use for now. It would give you the same result as if the quotes were not being cleared, which would be the most recent bid or ask price. You should be able to continue to analyze each trade as needed if you incorporate the work-around. The core issue causing the problem is still being investigated. It's uncertain at this point if a modification to the software will be made to automatically suppress the zeros before the values are returned to the EFS functions. When I hear more on the issue, I'll post to this thread.
                          Jason K.
                          Project Manager
                          eSignal - an Interactive Data company

                          EFS KnowledgeBase
                          JavaScript for EFS Video Series
                          EFS Beginner Tutorial Series
                          EFS Glossary
                          Custom EFS Development Policy

                          New User Orientation

                          Comment


                          • #14
                            Jason,
                            Thanks, but are you saying that if I programmatically keep the last non-zero bid and ask values, that they are valid for comparison with a current trade/tick, as to whether it occurred at the bid or the ask? How would you know that's true? It seems to me that all bets are off, unless you know something about what's causing the zeros.
                            Thanks for helping with this issue.

                            Comment


                            • #15
                              Hello bfry,

                              The logic is simple. We know that zeros are not valid. We also know that the zero is intended to remove a stale quote, not update the current inside market. If we simply ignore the zeros, you'll see when comparing the results of the formula below to Time & Sales, Market Depth or a raw tick chart, the EFS current Bid/Ask prices match the inside Bid/Ask from these other sources. The other sources already suppress the zeros in a similar fashion.

                              Here's the code example and file.
                              BidAskValues.efs
                              PHP Code:
                              function preMain() {
                                  
                              setStudyTitle("Current Bid/Ask");
                                  
                              setCursorLabelName("Current Bid: "0);
                                  
                              setCursorLabelName("Current Ask: "1);
                                  
                              setDefaultBarFgColor(Color.red0);
                                  
                              setDefaultBarFgColor(Color.green1);
                              }

                              var 
                              nBid null;
                              var 
                              nAsk null;

                              function 
                              main() {
                                  if (
                              getCurrentBarIndex() < -1) return;
                                  var 
                              nBid_temp getMostRecentBid();
                                  var 
                              nAsk_temp getMostRecentAsk();
                                  
                                  if (
                              nBid_temp 0nBid nBid_temp;
                                  if (
                              nAsk_temp 0nAsk nAsk_temp;

                                  if (
                              nBid == null || nAsk == null) return;
                                  
                                  
                              // Time Stamp
                                  
                              var vDate = new Date();
                                  var 
                              vHr vDate.getHours();
                                  if (
                              vHr 10vHr "0"+vHr;
                                  var 
                              vMn vDate.getMinutes();
                                  if (
                              vMn 10vMn "0"+vMn;
                                  var 
                              vSc vDate.getSeconds();
                                  if (
                              vSc 10vSc "0"+vSc;
                                  
                              //debugClear();
                                  
                              debugPrintln(vHr ":" vMn ":" vSc "  " getSymbol() + "  bid: " nBid.toFixed(4) + " ask: " nAsk.toFixed(4));
                                  
                                  return new Array(
                              nBid.toFixed(4)*1nAsk.toFixed(4)*1);

                              This formula is a non-price study that sends the current bid/ask to the chart and to the Formula Output window with a time stamp for the trade.

                              You can use this time stamp from a chart with 60S or T interval to match the trade to the Time & Sales window to verify the last bid or ask price just prior to the time stamp of the trade. Here's a couple examples with AB #F. I've looked at about 20 trades or so and haven't found any that hasn't matched yet. Let me know if you do.




                              When comparing the formula on a raw tick chart to the Market Depth window you should see this match as well. Ignore the Time & Sales window in the background of the image below, it is scrolled down to an earlier time frame. Just look at the Market Depth window and the info in the cursor window of the Advanced Chart.

                              Jason K.
                              Project Manager
                              eSignal - an Interactive Data company

                              EFS KnowledgeBase
                              JavaScript for EFS Video Series
                              EFS Beginner Tutorial Series
                              EFS Glossary
                              Custom EFS Development Policy

                              New User Orientation

                              Comment

                              Working...
                              X