Announcement

Collapse
No announcement yet.

Bid_Ask Volume efs

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

  • #46
    ???

    Jason,

    I am not sure I understand you. I was referring to the BidAskVolume Ratio efs that you did and not the BidAskvolume efs which is different. By the way did you do revised version of the BidAskVolume Ratio efs? If so can you post that here please. Thanks.

    Sesh

    Comment


    • #47
      BidAskVolumeRatio.efs
      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


      • #48
        Thanks

        Thanks Jason for the prompt reply. I hope you will be able to do what Plumber had asked.

        Sesh

        Comment


        • #49
          Thought someone would have made the code by now. This is what I got so far just doodling around. The question is how do I convert this efs from volume within the tick bar to bid-ask-total tick within the bar?

          /************************************************** ***************
          Provided By : eSignal. (c) Copyright 2003
          ************************************************** ***************/

          function preMain() {
          setStudyTitle("Bid\/Ask Volume");
          setCursorLabelName("Ask Vol", 0);
          setCursorLabelName("Total Vol", 1);
          setCursorLabelName("Bid Vol", 2);
          setDefaultBarFgColor(Color.lime, 0);
          setDefaultBarFgColor(Color.lime, 1);
          setDefaultBarFgColor(Color.red, 2);
          setDefaultBarThickness(5, 0);
          setDefaultBarThickness(5, 1);
          setDefaultBarThickness(5, 2);
          setPlotType(PLOTTYPE_HISTOGRAM, 0);
          setPlotType(PLOTTYPE_HISTOGRAM, 1);
          setPlotType(PLOTTYPE_HISTOGRAM, 2);

          }

          var nBidVol = 0;
          var nTotalVol = 0;
          var nAskVol = 0;
          var vVol = null;
          var bPrimed = false;
          var Trend = 0;

          function main() {
          if (getCurrentBarIndex() < 0) return;


          var nState = getBarState();
          if (nState == BARSTATE_NEWBAR) {
          nBidVol = 0;
          nTotalVol = 0;
          nAskVol = 0;
          vVol = 0;
          }

          var vPrevVol = null;
          if (vVol != null && bPrimed == true) vPrevVol = vVol;

          var nAsk = getMostRecentAsk();
          var nBid = getMostRecentBid();
          var vClose = close();
          vVol = volume();

          var vTradeVol = vVol - vPrevVol;
          var nTotalVol = nBidVol + nAskVol;

          if (bPrimed == false && vVol != null) {
          bPrimed = true;
          return;
          } else {
          if (vClose <= nBid) {
          nBidVol += vTradeVol;
          } else if (vClose >= nAsk) {
          nAskVol += vTradeVol;
          } else {
          nTotalVol += vTradeVol;
          }
          }

          return new Array(nAskVol, nTotalVol, nBidVol);
          }


          In other words, to make the bottom histogram , which is total volume with bid-ask volume on a 1000V chart, be the same but using ticks instead?
          Attached Files
          Last edited by theplumber; 09-16-2004, 09:13 AM.

          Comment


          • #50
            Hello plumber,

            In other words, to make the bottom histogram , which is total volume with bid-ask volume on a 1000V chart, be the same but using ticks instead?
            I'm not sure I understand what you're trying to do. The execution of the EFS is still triggered by ticks on a 1000V chart. A new bar starts once there is a least 1000 contracts or shares in volume. Are you saying you want to see the trade counts at bid/ask instead of volume? Please describe in greater detail what you are expecting to see on a 1000V chart with your code.
            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


            • #51
              Originally posted by JasonK
              Hello plumber,



              I'm not sure I understand what you're trying to do. The execution of the EFS is still triggered by ticks on a 1000V chart. A new bar starts once there is a least 1000 contracts or shares in volume. Are you saying you want to see the trade counts at bid/ask instead of volume? Please describe in greater detail what you are expecting to see on a 1000V chart with your code.
              Yes, I know I didn't make sense when I read it back to myself, sorry. I think the trade difference (uptick-downtick) instead of volume. I looked for any key words within efs but didn't find any. Thanks
              Last edited by theplumber; 09-16-2004, 10:11 AM.

              Comment


              • #52
                Hello plumber,

                Modify the following section of the code where we were adding vTradeVol to the global vars, nBidVol and nAskVol to the following. You can change the naming conventions if you like since they aren't storing volume anymore.


                PHP Code:
                if (bPrimed == false && vVol != null) {
                    
                bPrimed true;
                    return;
                } else {
                    if (
                vClose <= nBid) {
                        
                //nBidVol += vTradeVol;
                        
                nBidVol++;
                    } else if (
                vClose >= nAsk) {
                        
                //nAskVol += vTradeVol;
                        
                nAskVol++;
                    }
                }

                nTotalVol++; 
                This will give you the trade counts. Now you can change your return statement and plot the result of nAskVol-nBidVol, which would be the uptick-downtick. Keep in mind this code ignores ticks that are inside the most recent bid/ask values, so adding nBidVol and nAskVol will not always equal nTotalVol. We're simply incrementing nTotoalVol on every execution of the EFS, or every tick.
                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


                • #53
                  That's it
                  You guys are amazing as always, thanks. I'll post a chart later along with the efs if anyone wants it.

                  Comment


                  • #54
                    Plumber
                    You bet I want it, I have been watching this thread for weeks now, thanks for everyones help.
                    Mark

                    Comment


                    • #55
                      Playback

                      Jason,

                      I notice that whenever I change the chart parameters like time interval, tick to volume chart etc., the Bid/Ask volume ratio study plots that were there earlier get wiped out and it starts over again. I understand that the system does not capture the history of that data and so this may be happening. However, those plots appear when it is in replay mode. How is this possible? Is the plotting of that study in replay mode not correct? I should probably capture a snapshot of this before and after to notice the difference which I shall do tomorrow. Still the plotting in replay mode is puzzling. If no history is captured where is it getting the data from? Also when I close the replay function the study is blank again. Please clarify this phenomenon. Thanks.

                      Sesh

                      Comment


                      • #56
                        Yet another twist

                        Jason,

                        I just thought another piece of information may be useful for this Bid/Ask volume study. I think it would be useful to get a picture of the Bid/Ask sizes also within this study. The logic is that even if people are hitting the bids/ask but if there is more demand/supply available, then price may not move in the expected direction but instead may go the other way. We see it daily in the futures market wherein all the hits to the bid/ask are absorbed and the market switches direction.

                        So my request is this: would it be possible to include another line plot in the Bid/Ask study which would give the difference or ratio between Bid and Ask sizes also. Again like in the existing study if you can incorporate an option through Edit to choose the Bid/Ask difference or ratio would be great.

                        I look forward to your reply. Thanks. I hope you had a chance to read my earlier post on the Bid/Ask study in replay mode.

                        Sesh

                        Comment


                        • #57
                          Originally posted by its1111
                          Plumber
                          You bet I want it, I have been watching this thread for weeks now, thanks for everyones help.
                          Mark
                          Here's what I've been using on 300T charts. You can copy the code in my original post for help to use in volume charts, I like the posted one with 2000V charts for ES. Beware, these efs' are cpu hogs.
                          Attached Files

                          Comment


                          • #58
                            Invalid bid/ask values?

                            Jason,

                            Based upon our discussion of invalid bid and ask prices,
                            don't you need to check for validity and synthesize
                            the last *valid* bid and ask prices in the formula?

                            var nAsk = getMostRecentAsk();
                            var nBid = getMostRecentBid();

                            What happens when nAsk==0 or nBid==0? Just
                            asking the question... I do a great deal of bid/ask
                            analysis and it's sometimes tricky to get exactly
                            right.

                            Comment


                            • #59
                              Hello All,

                              Just letting you know I've been working a few new studies for the library revolving around the ideas we've been discussing. And yes, bfry, I will incorporate the validation for the zero bid/ask problem. I'll also add the validation to the existing bid/ask studies in the library. I'm going to be out of the office all next week, so if I don't get some of these done today, you can expect to see some new formulas to play with the following week when I return.

                              Sesh, I'll look into the replay issue, however, I don't think the info you're seeing is correct. By the way, are you looking at bar replay or tick replay? In regards to the sizes, I think it would be best to view this as a separate study. We would have some scaling issues if we combined sizes with the volume studies. Have you looked at BidAskSize.efs?
                              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


                              • #60
                                I've also been experimenting with just the bidask volume efs. I got it to work painting the candles per the trade volume @ the bid or ask but the problem is I can't get it to paint the total volume red/lime within the candle.... yet. The tradestation code I have has a "control point", which is the dividing line between the bid or ask volume within the candle. Does this sound right? Here's where it's from http://www.tradestationworld.com/dis...Topic_ID=11263

                                Comment

                                Working...
                                X