Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Delta Buy/Sell Volume

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

    Indicator edit: limit variable added

    Per commodity trader's request, here is the export of my edited version. This adds a variable to define a trade volume limit value to use in the cum. delta calculation.

    I.e. if trade is < 50 contracts, do not add to cum. delta.
    if trade is >= 50 contracts, trade is added to cum. delta.

    You'll have to manually edit the source to change the limit value (variable is Vol_Lim currently set at 50) to a setting to your liking.

    I have not tested this at all. So if anyone does test it, please post with the results.
    Attached Files
    Last edited by Pepperdog; 11-28-2008, 03:52 PM.

    Comment


      Thanks Pepperdog.

      I hope some of the ninja users can do multiple tests of this version and post results here. I think a good way to test it is to just load a 1 min ES chart during like after hours (like 9pm or 10pm EST) and manually calculate delta using Time and Sales window, to see if it matches the indicator plot on the 1 min ES chart.

      Commodity_trader

      Comment


        Just keep in mind this is the exact same code as the original indicator in this thread, with the addition of the vol_lim variable to exclude trades with volume less than the vol_lim in the cum. delta calculation. So if the original indicator is incorrect, this one will likely be incorrect as well. Unfortunately.

        I have not personally tested this in any way and I do not use it in my trading (but I am very interested in the delta concept), so use it at your own risk! If anyone does test this, please post any results.

        Comment


          Suggestion

          I think the Delta bars should be ordered behind the cumulative line . Just a
          thought . Did some replays with the indicator . Will be watching it real close
          on Monday . Thanks for posting the indicator .

          ::This is a note to Sbgtrading , don't why it wound up on this page
          Last edited by T2020; 11-30-2008, 12:34 PM.

          Comment


            Regarding the logic of this indicator....

            What if the spread between the best bid & ask is greater than 1 tick, and trades occur inside the spread? It seems this volume is not accounted for?

            I'm trying to come up with additional logic to account for these situations. Any ideas?

            Comment


              Originally posted by Pepperdog View Post
              Regarding the logic of this indicator....

              What if the spread between the best bid & ask is greater than 1 tick, and trades occur inside the spread? It seems this volume is not accounted for?

              I'm trying to come up with additional logic to account for these situations. Any ideas?
              That's correct...transactions inside the spread are considered indeterminate (they aren't considered either buy pressure or sell pressure).

              Comment


                Thanks sbg.

                Here's another one for ya. When the indicator is set to Uptick/Downtick, and a series of one/small lot trades fire off, with no uptick or downtick in between each trade, the volume beyond the first trade will not be counted toward the cumulative delta?

                Comment


                  Originally posted by Pepperdog View Post
                  Thanks sbg.

                  Here's another one for ya. When the indicator is set to Uptick/Downtick, and a series of one/small lot trades fire off, with no uptick or downtick in between each trade, the volume beyond the first trade will not be counted toward the cumulative delta?
                  I believe the volume will be counted toward the most recent tick move. So if the last tick was up, all volume after that but before a down tick will be counted as buy volume. Is that what you're asking?

                  Comment


                    Originally posted by Pepperdog View Post
                    Regarding the logic of this indicator....

                    What if the spread between the best bid & ask is greater than 1 tick, and trades occur inside the spread? It seems this volume is not accounted for?

                    I'm trying to come up with additional logic to account for these situations. Any ideas?

                    Hi Pepperdog,

                    The transactions which happen above ask or below bid, are the ones that were not interpreted and are getting missed in delta calculation. I do not think these should be ignored, as many such trades happen. Please see my old post in this thread, 5/8/08 where in one of the tests I did on 1 min ES, there was lot of difference between the manual delta and the delta plotted. And I think the difference was due to missing these trades happening with good volume.

                    --
                    Commodity_trader

                    ===========================

                    My old post of 5/8/08,where I commented on the results on 1 min ES.

                    Originally posted by commodity_trader View Post
                    Hi Ben,

                    Glad to see the updated version.

                    I loaded the new updated version on 1 min ES chart as a bar plot (with cumulative turned off), during late evening overnight hours when ES is slow. I also loaded a ES Time and Sales window,to calculate delta manually. I found that it is not calculating delta of the bars correctly.
                    It starts off calculating delta of the bar correctly,but when a transaction happens which is "above ask" or "below bid", it seems to interpret it wrong and plotting delta of the bar incorrectly.

                    Is it possible, you are not handling, and missing the "above ask" or "below bid" transactions somehow. And due to this, delta of the bar which say has to be like very high is ending up very small. For example, 7:19 pm EST, there was a huge block transaction "above ask" in Time and Sales showing delta of the bar as 200+, but the indicator plotted it as close to zero (around +5). It appears as if it is missing thos transactions.

                    Just a guess, if the below part of the code in the "BidAskVolume" else section is somehow missing to catch the "above ask" or "below bid" transactions.


                    =====================================

                    if (e.Price >= e.MarketData.Ask.Price) { buys += e.Volume; Total += e.Volume; }
                    else if (e.Price <= e.MarketData.Bid.Price) { sells += e.Volume; Total -= e.Volume; }


                    =====================================

                    May be Ray or someone from Ninja support can help us out here to comment if the above 2 lines of code is missing out the "above ask" or "below bid" transactions.

                    Commodity Trader

                    Comment


                      Originally posted by sbgtrading View Post
                      I believe the volume will be counted toward the most recent tick move. So if the last tick was up, all volume after that but before a down tick will be counted as buy volume. Is that what you're asking?
                      That is what I hope is happening, but I am not sure this is the case as I have not tested it. I've made a non-cumulative version (per bar delta) of this indicator, and by just observing it live with CalculateOnBarClose = FALSE it appears that only the volume of the first trade after an up/down tick is being counted.

                      When I have some spare time I was planning to do more thorough testing.

                      Comment


                        so does this version of the indicator work?

                        Hi,

                        I just read through the entire thread and it seems that greentrader pointed out around 10 posts back the the indicator isn't correct and a seperate variable is needed to store the bid ask info and then compare with the current price. Has anyone posted a working copy of the codes?

                        Thanks

                        JW

                        Comment


                          Welcome to our forums JW - did you give the last modification by Pepperdog a try?
                          BertrandNinjaTrader Customer Service

                          Comment


                            What is the final resolution? Does the indicator posted last by sbgtrading work on a tick chart using bid/ask vol?

                            Comment


                              I downloaded the indicator about half an hour ago on my 5 minute ES chart, but it is just a orange horizontal line. Do i need to do something to make it work or is it because there aren't enough orders going through because the market is closed and so it doesn't move?

                              Does it look like the chart fulcrum posted when it works whereby you can see divergences betweent eh indicator and the price?
                              thanks
                              Last edited by subterfuge; 03-04-2009, 05:02 PM.

                              Comment


                                Originally posted by subterfuge View Post
                                I downloaded the indicator about half an hour ago on my 5 minute ES chart, but it is just a orange horizontal line. Do i need to do something to make it work or is it because there aren't enough orders going through because the market is closed and so it doesn't move?

                                Does it look like the chart fulcrum posted when it works whereby you can see divergences betweent eh indicator and the price?
                                thanks
                                the orange line is the indicator. you'll see it move better when regular market is open. however, I don't think its correct the way it is. Read the previous couple pages and you'll see why. the divergence will only show up some of the times, other times it'll trick you to do the wrong thing. like today on nq when price crashed after hitting 1120's but the CD was still printing strong long bias. use it carefully.

                                JW

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Austiner87, Today, 03:42 PM
                                1 response
                                14 views
                                0 likes
                                Last Post NinjaTrader_Manfred  
                                Started by cshox, Today, 11:11 AM
                                2 responses
                                12 views
                                0 likes
                                Last Post cshox
                                by cshox
                                 
                                Started by algospoke, Today, 06:53 PM
                                0 responses
                                5 views
                                0 likes
                                Last Post algospoke  
                                Started by mlprice12, 12-21-2021, 04:55 PM
                                3 responses
                                293 views
                                0 likes
                                Last Post paypachaysa  
                                Started by lorem, 04-25-2024, 09:18 AM
                                20 responses
                                85 views
                                0 likes
                                Last Post lorem
                                by lorem
                                 
                                Working...
                                X