Announcement

Collapse
No announcement yet.

Cummulative Bid Ask Volume

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

  • Cummulative Bid Ask Volume

    I would like to suggest the following study:

    1- Name: Cumulative Bis Ask Volume
    2- Non Price study
    3- Indicator
    4- This would be a cumulative Volume study (1 line) that would start at zero, and for every tick:
    - Adds the volume of the last trade if executed at ASK or higher.
    - Subtracts the volume of the last trade if executed at bid or lower.
    - Do nothing if the last trade was executed in between Bid and Ask.

    Thanks

  • #2
    Bid Ask Cumulative study

    I would also be interested in such a study.

    Studies that provide more detailed information about volume create advantages for traders and will surely be appreciated by Esignal Customers.

    THINK:

    Volume Profiles for each bar/candle or grouping of bars/candles

    Wouldn't we all like to see where the most trades took place in the last 5 minutes (or of the last 5000 contracts traded) and if we are now trading above/below that level.

    This seems doable for Esignal.

    Comment


    • #3
      see if this plots the ask and bid info you want, only starts from when the chart is loaded, no historical data
      Attached Files

      Comment


      • #4
        David - Screenshot of Cumulative B/A

        David, Here is a screenshot of what I get with the study.

        Any suggestions?
        Attached Files

        Comment


        • #5
          Sorry, no suggestions, the efs only works from the time you start the chart forward.

          Is that what you wanted to see, the growth in Bid trades vs ask trades?

          Comment


          • #6
            David

            Thank you for your help.

            The formula you provided is what I need.
            The only problem it seems to have is that it does not update on every tick, so lots of trades are ignored.
            It only executes when the last traded price is different from the previous traded price (or when a new time bar starts).

            Is there a way to make it work on every tick?

            JM

            Comment


            • #7
              Cumulative

              David,

              I sent the screen shot to show that the lines were plotting in BLUE. When I looked at the code I saw LIME and RED as the chosen colors and could not figure out why it was ploting in BLUE.
              I was wondering if yours was plotting in BLUE as well?
              Otherwise the study started immediatly after loading the chart as intended.

              I think JM wanted to just see ONE LINE that had the "trades at bid" subtracted from the "trades at ask". I was wondering if it was plotting as one line for you?

              Personally I like the way it plots with two different lines.
              I am just trying to get trades at bid in RED and trades at ask in LIME.

              Come to think about it, if both lines were plotted above the zero line in the X axis you could visually see them crossover. (Which hopefully would provide a nice signal)[something like the gif below of uvol/dvol]

              Again, any suggestions for this efs illiterate would be appreciated.

              I did notice that on a volume chart it added all the trades and on a time chart it seemed to not add every trade.
              Attached Files

              Comment


              • #8
                Hello All,

                Check out this version. I made a few tweaks to David's formula.
                cumBidAskVol.efs

                Since the formula only collects data for display in real time, would anyone have any interest in having the cumulative numbers start at zero at the beginning of each bar vs. from the time the formula is loaded? We could make it an option as well.



                Himalaya, the formulas do execute on every trade, not just a change in price. The problem you might be seeing has to do with fast markets. At times, there may be several trades that occur in such a short period of time that the EFS can't execute for every trade. Some trades will get skipped in this case. It's a known problem. Not sure if or when a solution to that will be found.
                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
                  Nice Tweak

                  Jason,

                  Nice!

                  Are you referring to something like the Bid/Ask Volume efs that counts trades at the bid/trades at the ask for each bar?

                  Any Market Profile, Volume profile, Volume dissecting study is highly appreciated.

                  Volume Profile for each bar is the dream!
                  Would settle for a "DOT" on each bar where the highest volume occurred.

                  Thanks again for the good work.

                  Comment


                  • #10
                    Bid/Ask Volume

                    Hi

                    I've downloaded and look at and played with 2 .efs files found here to do with Bid/Ask volume. and they both calculate incorrectly I'm afraid.

                    Here is the code for them.



                    function preMain() {
                    setStudyTitle("Bid/Ask Volume");
                    setCursorLabelName("Ask Vol", 0);
                    setCursorLabelName("Inside Vol", 1);
                    setCursorLabelName("Bid Vol", 2);
                    setDefaultBarFgColor(Color.green, 0);
                    setDefaultBarFgColor(Color.black, 1);
                    setDefaultBarFgColor(Color.red, 2);
                    setDefaultBarThickness(8, 0);
                    setDefaultBarThickness(6, 1);
                    setDefaultBarThickness(4, 2);
                    setPlotType(PLOTTYPE_HISTOGRAM, 0);
                    setPlotType(PLOTTYPE_HISTOGRAM, 1);
                    setPlotType(PLOTTYPE_HISTOGRAM, 2);
                    }

                    var nBidVol = 0;
                    var nInsideVol = 0;
                    var nAskVol = 0;
                    var vVol = null;
                    var bPrimed = false;

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

                    var nState = getBarState();
                    if (nState == BARSTATE_NEWBAR) {
                    nBidVol = 0;
                    nInsideVol = 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;

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

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



                    ------------------------------------------------------------------------


                    var bidVol;
                    var askVol;

                    function preMain()
                    {
                    setStudyTitle("Volume Diff");
                    setCursorLabelName("Volume Diff");
                    setCursorLabelName("Volume Diff",0);
                    setDefaultBarFgColor(Color.fushcia,2);
                    }

                    function main(){
                    if(getValue("day",0)!=getValue("day",-1)){
                    bidVol=0;
                    askVol=0;
                    }

                    if(close()>=getMostRecentAsk())
                    askVol=askVol+getMostRecentTradeSize();

                    if(close()<=getMostRecentBid())
                    bidVol=bidVol+getMostRecentTradeSize();

                    return (askVol - bidVol);
                    }

                    ------------------------------------------------------------------

                    They both work up to a point, but they hit a huge snag, when the price is bouncing around. If the price moves down through the bid, and then does not pose a new lower bid, but immediately has buying at the ask (the same price), then it records the colume as being at the bid price instead of at the ask price even though the bid price has moved down, because it seems to be getting the last bid that was traded or the last ask that was traded, rather than the current actual bid price or ask price.

                    The time and sales is clearly able to distinguish between the two with little difficulty, but the .efs files can not.

                    I've not idea how to fix this, but hope someone else will know how to make it calculate properly.

                    Kind regards

                    Natalie

                    Comment


                    • #11
                      I tried to attach a picture of the T&S but failed so try again...

                      Also, This ought to be able to calculate historically for at least 10 days since the data is already in the time and sales and correctly shown there, so the historical data exists at least for the 10 days. Shame that it is not possible to access the historicalas well...

                      Kind regards
                      Natalie
                      Attached Files

                      Comment


                      • #12
                        Hi,

                        Been doing some adding up.

                        The 3 mins between 07:51:00 and 07:53:59 EST should be showing a difference of +21 contracts on ES Z3, but is calculating it as being a difference of +14 becasue it is calculating some of the ticks and the Ask into the Bid, thus reducing the on balance volume.

                        (Doing this in out of hours seems to be the right time, since there are many fewer ticks to have to deal with, and the problem is still showing up)

                        The volume 'should' be leading the price, but at the moment it is lagging the price because of the incorrect assignment of volume in this way. Just some more information that might help in solving the problem.

                        Kind regards

                        Natalie

                        Comment


                        • #13
                          b/a vol problem

                          i've been tinkering with this indicator as well...

                          my findings agree with natalie's. when you compare time and sales, sometimes it is very significantly off. for instance, today (10/13) at 3:15 EST on the 1 minute bar esz3 there was a reading of 962 ask vol. and 161 bid vol., however adding up time and sales i got the approx. numbers 453 av and 658 bv.

                          i understand that it reads the volume as it comes in... so maybe the problem lies there. would it be possible to call the actual t&s data instead through script? perhaps this way it would be possible to view historical values as well, which would make this a really great tool i believe.

                          anyway, thank you for your support and ingenuity thus far. it is sincerely appreciated.

                          regards,
                          lorn

                          Comment


                          • #14
                            Hello Natalie and Iron,

                            Just wanted to let you know I've been doing some testing on this issue. What I've found is that there is a problem with certain symbols. Seems to be related to the electronically traded symbols such as ES and NQ. Regular symbols such as IBM, INTC etc. are executing properly. This problem will be reported to our development team.

                            I used the formula below to compare the EFS execution with the Time and Sales window. For better comparison, set the Time and Sales window to only display trades. With ES and NQ, for example, when a string of trades occur at the same price and they are all at the ASK, EFS is only executing on the first trade in that series. As soon as a trade occurs at the BID or at a different price than the last trade, then the EFS gets executed.

                            EFSvsTimeSales_bug.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


                            • #15
                              I have found something similar that works great for active trading! Maybe esignal would take this idea and seriously consider making it a standard window in its future applications. Below is some basic information on how the other window works it.


                              The Dynamic Ticker is a powerful and fast way to get instant "signals" based on the activity of every Market Maker, ECN or Exchange. These signals can be viewed in either a scrolling text or graphical format. The graphical ticker provides bar graph-style representations of information on market participant activity, allowing you to determine the momentum of a stock at a glance.


                              Score combines a symbol's Activity Rate (the amount of market participant activity that has occurred for a particular symbol over the last time frame by counting the number of messages that have scrolled through the Dynamic Ticker for that stock) and Net Value (the sum of all the signal weights for a particular symbol over the last time frame by summing the green (+1) and red (-1) messages that have scrolled through the window for each stock) into a single strength value. This compensates for the unfavorable behavior of the Net Value on low activity stocks and allows the Score to give a much more reliable movement indication. The Score is computed using the formula: score = value * raten

                              Where value is the Net Value, rate is the Activity Rate, and n is the rate biasing factor. The Rate Biasing Factor allows a trader to emphasize or de-emphasize a stock's rate in the computation of its score. This is a handy feature when high and low volume stocks are being tracked in the same ticker window. Setting the bias to less than 1 de-emphasizes the rate difference between high and low volume stocks and tends to equalize their scores. Likewise, setting the bias to values greate
                              Last edited by FibbGann; 10-18-2003, 07:19 AM.
                              Excellent book on JavaScript for beginners

                              Comment

                              Working...
                              X