Announcement

Collapse
No announcement yet.

Bid_Ask Volume efs

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

  • #91
    Bid Ask with size

    Hi Jason,

    Your code is really great ... I was playing with this concept and when I saw your code it was much better than mine ... ... Have you thought about using size on the bid/ask using getMostRecentBidSize/getMostRecentAskSize. If i read these correctly. Thanks
    Last edited by prawles; 11-10-2004, 05:23 PM.

    Comment


    • #92
      Hello prawles,

      Glad you like it.

      I'm not sure how the bid and ask sizes would be useful in the context of the the ratio or analysis formulas. Those sizes don't always correspond with the actual trade size. Perhaps you can tell us more about how you would analyze that data. Or perhaps, check out the BidAskSize.efs. This might be what you're looking for.
      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


      • #93
        Ahhh ... Thanks Jason. I was wondering if the functions were actual trades sizes. Also, is there a way to get strikes at the Bid/Ask?

        Comment


        • #94
          Hi Jason,

          Can you point me a function that will show actual trade size. My thoughts are that a ratio/difference analysis based upon size at the Bid/Ask would give better insight . In Addition, this would allow you to filter lot sizes, which would also give better insight. Thanks for taking the time to help me out .

          Comment


          • #95
            Jason,

            Great work on the Bid Ask formulas.

            Wanted to know if user specified alerts can be built into the BidAskAnalysis efs.


            Thank you.
            Michael

            Comment


            • #96
              Hello prawles,

              You could use the getMostRecentTradeSize() function. As for filters for lot size, that has been requested previously and I will add something for that 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


              • #97
                Hello Michael,

                Yes, absolutely. Alerts may be added to any study. If a particular study already has conditions for buy and sell signals you can simply add one of the Alert object methods to the code block that gets executed when the condition is true. In the case of these Bid/Ask studies I would suggest adding a section just above the return statement in main that uses the studies existing variables in some conditional statements. One thing you might also want to add is a global flag that allows the alert to trigger only the first time it occurs during the current interval. Here's an example of what you would need to incorporate into these Bid/Ask studies.

                PHP Code:
                // global values
                var bAlert false;  // add this

                function main(sTypesOutputsSourcecAskcInsidecBid
                    
                nAskThicknessnInsideThicknessnBidThickness,
                    
                sAskDisplaysInsideDisplaysBidDisplaysTotalDisplay) {

                    if (
                getBarState() == BARSTATE_NEWBARbAlert true;  // add this
                    
                    /** formula code **/

                    // Alerts
                    
                if (nDask nDbid && bAlert == true) {  // add this
                        
                Alert.playSound("Ding.wav");  // add this
                        
                bAlert false;  // add this
                    
                }  // add this
                    
                    
                return new Array(nDtotalnDasknDinsidenDbid);

                The global variable, bAlert, needs to be set to true at new bar. This tells the study that alerts are allowed to be executed. In the code block for the conditional statement that checks for the alert, you need to set bAlert to false so that the alert doesn't execute on every trade after the first time the condition was true. The condition for the alert in this example is not that intersting but I'm sure you can come up with something much more useful.
                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


                • #98
                  Thanks Jason .. GetMostRecentTradeSize may be better ... Please take a look at this and see what you think.

                  else if (sSource == "Size") {
                  if (nState == BARSTATE_NEWBAR) {
                  if (sType == "Bar" || getDay(0) != getDay(-1)) {
                  nBidSize = 0;
                  nInsideSize = 0;
                  nAskSize = 0;
                  nTotalSize = 0;
                  }
                  }

                  var nTempAsk = getMostRecentAskSize();
                  var nTempBid = getMostRecentBidSize();
                  var nTempTrade = getMostRecentTrade();

                  if (nTempAsk != null && nTempAsk != 0) nAsk = nTempAsk;
                  if (nTempBid != null && nTempBid != 0) nBid = nTempBid;
                  if (nTempTrade != null && nTempTrade != 0) nTrade = nTempTrade;
                  var vClose = close();

                  if ((nTrade > nLastTrade) && (nAsk > nLotFilter)) {
                  nAskSize += nAsk;
                  nLastTrade = nTrade;
                  nTotalSize += nAskSize;
                  } else if ((nTrade < nLastTrade) && (nBid > nLotFilter)) {
                  nBidSize += nBid;
                  nLastTrade = nTrade;
                  nTotalSize += nBidSize;
                  }
                  //nTotalSize = nAskSize + nBidSize;
                  }

                  Comment


                  • #99
                    Hello prawles,

                    There is always more than one way to skin a cat. I did see one line you need to change.

                    var nTempTrade = getMostRecentTrade();

                    should be,

                    var nTempTrade = getMostRecentTradeSize();

                    Although I'm not sure your method will produce the same results. The getMostRecentBidSize would reflect the the size quoted from the most recent inside market. Wouldn't it be possible for a market order to come through at a lot size that's different than the most recently quoted Bid or Ask size?

                    The better way to go may be to store the most recent trade size in a variable and check the most recent price against the most recent bid and ask price. Then add the most recent trade size to the global variables.
                    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


                    • Hello All,

                      The Trade Volume Filter has now been added to BidAskAnalysis.efs. Visit this link to download the new version. The default for the filter is set to 0 and the formula will only take the filter into account when the Source is set to "Volume" in the study parameters. Any trade that has less than the specified volume filter will be excluded from the study similar to the volume filter in the Time and Sales window.
                      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


                      • Hello Jason. Can you modify the BidAskVolumeRatio.efs to provide for a cumulative display of say Ask-Bid, similar to the how you provided for the cumulative display feature in BidAskAnalysis.efs? Thanks.

                        Comment


                        • Hello rcsesq,

                          I assume you meant, BidAskVolume.efs as the BidAskRatio.efs already plots the cumulative values by default. Download the new version at the link above. This formula now has the same option as BidAskRatio.efs to perform bar or cumulative analysis. It is set to Bar by default, so after applying it to the chart, set the Analysis parameter to Cumulative in Edit Studies.
                          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


                          • Ah! I didn't realize that the BidAskRatio.efs had the capability to do this. I see now that its in the pull down menu for Study Output. Thanks for the prompt reply.

                            Comment


                            • You're most welcome.
                              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


                              • Jason, going back to the BidAskRatio.efs, can you modify this efs or create a new one, which would allow for a moving average of say, the cumulative Ask - Bid, so as to create a smoother line plot of that differential? Thanks for any assistance you can render.

                                Comment

                                Working...
                                X