PDA

View Full Version : Delta Buy/Sell Volume


Pages : [1] 2 3

sbgtrading
11-26-2007, 06:07 AM
Hello everyone,

Calculation Mode Changed on 3/18/09 in response to user requests

I've made a sweeping change to the cumulative delta indicator and posted it to this message. It is one indicator that lets you choose from the following 3 cumulative delta types:
1) Bid/Ask Volume
This is cumulation of the volume at the Ask - volume at the Bid
2) UpTick/DownTick Volume
This is the cumulation of the volume on upticks - volume on downticks
3) Tick Count
No volume in this calculation, just the sum of upticks - downticks

I believe this is a more efficient handling of the incoming market data and it may lead to resolving some of the "discrepancies" in the cumulative calculation. Please test it and report back to this thread.

Another enhancement in this version is you can completely turn-off the individual bar delta values (which were plotted as green and red dots in prior versions). This will prevent any undesirable scaling issues with the panel.

Finally, this indicator lets you specify a minimum volume per transaction, thereby letting you eliminate low-volume transactions from the calculation.

Let me know if you have any questions! Please test this indicator and report back.

Enjoy!
Ben

samiam30
11-26-2007, 08:18 AM
Thank you, kind sir :D.

garciaal
11-28-2007, 12:59 PM
I get the following error message; "Import failed. There are NinjaSript files in the imported NinjaScipt Archive file that have programming errors. these errors must be resolved before you can import the Ninja Script Archive Files."

I have imported other files with no problem. Any clue to what may be causing this.
Thanks, Al

samiam30
11-28-2007, 01:16 PM
The indicator only works in NT v6.5.

garciaal
11-28-2007, 03:00 PM
Samiam,
Thanks for ther quick reply, I'm still using 6.0. I wonder if there are going to be other indicators from 6.0 that won't work with 6.5?

Thanks, Al

marketguy2
11-28-2007, 03:10 PM
Thanks for the indicator. It showed a beautiful Delta Divergence on the ES at 15:20. Very cool. I will definitely keep an eye on this indicator.

I have a request (or two).
1. The Delta number showing in the price panel covers the NT bar timer making the countdown timer unreadable. Could you possibly move its location?

2. This is more in terms of a wish rather than a request. The concept of Delta Divergence can be a very useful tool. As price makes a new high and the delta becomes negative, we have a divergence. Vice Versa on new lows. It would be so cool if we could get a dot or arrow reminding us when we have a Delta Divergence at a new high or low (and even cooler a dot and an audible alarm).

Anyway, thanks for the great work. it is appreciated.

sbgtrading
11-28-2007, 04:57 PM
markeguy,

There is a parameter to this indicator that lets you choose where to place the indicator. Go ahead and view the parameters (Ctrl-I) and find the parameter called "Counter Location". Select one of the listed values.

Ben

garciaal
11-28-2007, 04:58 PM
Sbgtrading,

Could you tell what part of code needs to be modified to work with 6.0?

Thanks, Al

sbgtrading
11-28-2007, 05:03 PM
Samiam,
Thanks for ther quick reply, I'm still using 6.0. I wonder if there are going to be other indicators from 6.0 that won't work with 6.5?

Thanks, Al

Everything that works in 6.0 should work in 6.5...the problem is that not everything that works in 6.5 works in 6.0. They are not backward compatible.

Ben

sbgtrading
11-28-2007, 05:08 PM
Sbgtrading,

Could you tell what part of code needs to be modified to work with 6.0?

Thanks, Al


That would be a good question for the NinjaTrader specialists here...there may not be a migration path backwards for this indicator. I haven't had enough experience to see how 6.0 capabilities provide a way to handle live market data events. Sorry!

Ben

marketguy2
11-28-2007, 05:33 PM
Thanks,
I now have the counters where I can see them.

samiam30
11-29-2007, 12:53 AM
1. The Delta number showing in the price panel covers the NT bar timer making the countdown timer unreadable. Could you possibly move its location?


You can easily change the location of the counter (Indicators->Parameters-> top option-> change the text):

BL -> Bottom Left (default setting)
BR -> Bottom Right
TL -> Top Left
TR -> Top Right

garciaal
11-29-2007, 07:41 PM
To Any NinjaScript Expert,

See post #8 & 9 above, is there any way to get this to work with ver6.0

Thanks, Al

NinjaTrader_Josh
11-30-2007, 12:46 AM
This indicator requires the new methods exposed in NT6.5. A NT6 version of this will be of little value simply because it won't work.

garciaal
11-30-2007, 09:21 AM
Josh,
for those of us who are less informed what is the "new method"

NinjaTrader_Ray
11-30-2007, 09:44 AM
Likely the new OnMarketData() method.

NinjaTrader_Josh
12-01-2007, 12:47 AM
garciaal,

As Ray mentioned, the OnMarketData() method is new to NT6.5 and is required for this indicator to calculate properly.

moderate
12-18-2007, 09:42 AM
is there any way to possibly filter out the buy/sell by order size =D

NinjaTrader_Ray
12-18-2007, 10:28 AM
Can you elaborate what you mean?

moderate
12-18-2007, 10:40 AM
like only use order of 200 or more contracts (you pick). and only plot the delta buy/sell from orders of that size.

sbgtrading
12-18-2007, 10:42 AM
Definitely, I can add that for you.



like only use order of 200 or more contracts (you pick). and only plot the delta buy/sell from orders of that size.

Fulcrum
12-28-2007, 05:24 PM
Just noticed this thread...I will use this new indicator next trade day to check it out...I have been looking for a way to duplicate this type of set up..... http://www.linnsoft.com/tour/techind/vb.htm

I love the ability to use the "VB" tool in the cumulative mode to track the ES volume flow through the day....to see if the market is "net" negative or positive at s/r areas. This type of tool would be excellent in V6.5

KBJ
12-28-2007, 10:05 PM
I've just modified BuySellVolume to do this.

See: http://www.ninjatrader-support.com/vb/showthread.php?p=23711

ClayB1
01-11-2008, 11:17 AM
Is it possible to add an option to the Delta Buy/Sell Volume Indicator to make it cumulative?

I took a look at the code but it was beyond me to do this myself!

Fulcrum
01-12-2008, 11:30 AM
SBGTrading - I would like to personally thank you for your "delta" indicator work here at the NT forums! :) Again yesterday like many days, I was nailing buys/sells in the ES off intrabar delta divergences without having to use my Investor R/T set-up.

Great work sir...and good fortunes! :cool:

sbgtrading
01-12-2008, 02:17 PM
That's great news, Fulcrum...and thanks for the kudos! If you think of it, take a screenshot of your trades and post them here. I'm sure others will find your examples useful and instructive.

Ben


SBGTrading - Again yesterday like many days, I was nailing buys/sells in the ES off intrabar delta divergences without having to use my Investor R/T set-up.

PrTester
01-12-2008, 02:51 PM
That's great news, Fulcrum...and thanks for the kudos! If you think of it, take a screenshot of your trades and post them here. I'm sure others will find your examples useful and instructive.

Ben


That will be nice! :)

Fulcrum
01-13-2008, 12:05 AM
Will do..I will take some screen shots this Monday when I have delta data showing on my charts intra-day (I use Zenfire feed). :)

ClayB1
01-13-2008, 08:53 AM
Ben,

Thanks for adding the cumulative option to your Delta Buy Sell Volume indicator - I can't wait to give it a try on Monday. I always learn a lot by studying your code:)

Fulcrum
01-14-2008, 08:39 AM
CD showed a great entry early today and hit +5.0 points for my primary positions. Leaving 1/3'rd of the position (my runners) on to see if we challenge the recent high around 1419's. ;)

Fulcrum
01-14-2008, 09:14 AM
OK...the CD based Long trade worked out great and I am now flat. Final covers on the last 1/3'rd of the position at 1419.25 for +7.0 points.

Fulcrum
01-14-2008, 11:09 AM
Just had a Long entry at 1413.00 off a pretty big CD divergence as price pulled down to 1412.00 . There was more "net" holders/buyers of Long positions at the 1412.00 pullback than the previous time price was in the area of 1412's...so I took a Long entry. Trade facilitation was slow at the time of entry, so I had my first profit target at +2.0 points and my last target at +4.0 points....my stop is at 1213.25 for the runners.

Fulcrum
01-14-2008, 11:28 AM
Here is a better view of the 1412 area the first time and then later when I entered Long...you can clearly see the positive divergence in the CD as price retested the 1412.00 level.

Hope these examples help to display what I look for as entry locations (zones to buy or sell). :) Also, I just covered my last runners at 1416.00 for +3 points...that is plenty good enough for this trade.

PrTester
01-14-2008, 04:58 PM
Here is a better view of the 1412 area the first time and then later when I entered Long...you can clearly see the positive divergence in the CD as price retested the 1412.00 level.

Hope these examples help to display what I look for as entry locations (zones to buy or sell). :) Also, I just covered my last runners at 1416.00 for +3 points...that is plenty good enough for this trade.

Thanks for sharing Fulcrum, very illustrative :)

dkelly
01-14-2008, 09:09 PM
I'm new here. Could someone explain how to get this indicator into NT.

--Thanks

grd974
01-20-2008, 07:11 AM
Hi Fulcrum,

Would you mind elaborating on the way you plot the orange line in the DeltaBuySellVolume of the CDTrade2.jpg attached file ?

I modified the BuySellVolume indicators delivered by KBJ (I wrote cumulative, SUM(x) and even a MACD of DeltaVolume) but I could not make up something in the line of what I saw on your chart.

sbgtrading
01-20-2008, 12:35 PM
grd, I believe Fulcrum is using the indicator in Post# 25 to generate the orange line.


Hi Fulcrum,

Would you mind elaborating on the way you plot the orange line in the DeltaBuySellVolume of the CDTrade2.jpg attached file ?

I modified the BuySellVolume indicators delivered by KBJ (I wrote cumulative, SUM(x) and even a MACD of DeltaVolume) but I could not make up something in the line of what I saw on your chart.

Jack Verhoeff
01-20-2008, 12:38 PM
Hi, tried to load this indicator in beta 6.5 nut only get a 0 onthe indicator.
Can anyone help?

Thank Jack

sbgtrading
01-20-2008, 01:07 PM
Hi Jack,

The bad news is this indicator, like all bid/ask volume indicators in NinjaTrader, requires live data to be gathered. It doesn't work with historical data. In other words, you must load this indicator early in the day, then as time (and trade activity) passes, the data will be gathered and the indicator output will be relevant.

Also, be aware, that any recalculation of indicators on that chart will ZERO-OUT any gathered data. There has been quite a bit of discussion on this forum concerning this and the use of globals to retain this type of data. Hopefully, that will get resolved. Until then, be aware of this limitation.

Ben


Hi, tried to load this indicator in beta 6.5 nut only get a 0 onthe indicator.
Can anyone help?

Thank Jack

Fulcrum
01-27-2008, 06:04 PM
Hi Fulcrum,

Would you mind elaborating on the way you plot the orange line in the DeltaBuySellVolume of the CDTrade2.jpg attached file ?

I modified the BuySellVolume indicators delivered by KBJ (I wrote cumulative, SUM(x) and even a MACD of DeltaVolume) but I could not make up something in the line of what I saw on your chart.The orange line is just the plot of the cumulative delta value bar by bar.....so you can watch for trends or divergences in the conviction of the buyers and sellers (those willing to enter the market with "market orders" on the bid or ask.

Fulcrum
01-27-2008, 06:08 PM
I've modified the supplied BuySellVolume indicator to now show the delta (buy-sell) volume as a line plot.

Enjoy!
BenIs there any way to name this (intrabar) delta indicator as a separate file name from the last version which is the cumulative delta indicator...so a person can use both in separate panes?

palinuro
01-27-2008, 11:48 PM
Fulcrum,
Open the file for editing, then right-click and select "Save As". The code is changed automatically.

Do you start collecting cumulative delta in premarket or only during RTH?

Jack Verhoeff
01-28-2008, 06:29 AM
Thanks for the reactions!

samiam30
02-01-2008, 07:13 AM
sbtrading:

Would it be possible to modify this indicator (cummulative delta version) so it would display the delta between the uptick and downtick volume.

Uptick/downtick volume:
When "Up Tick vs Down Tick Volume" is specified, each trade that occurs on or after an uptick is placed in the buy volume category, while any trade that occurs on or after a downtick is considered in the sell volume category.

samiam30
02-03-2008, 01:25 AM
Thanks for coding this. Looking forward to comparing this with the cummulative bid/ask delta tomorrow.

Here is an interesting discusion about this topic:

http://www.traderslaboratory.com/forums/f34/what-is-demand-supply-volume-2994.html

cabmanage
02-03-2008, 12:24 PM
Ok, sorry, but here goes. Would someone be kind enough to explain/define, for me, the term "Delta", as it is described and used in this thread?

Thank you very much.

Stan

samiam30
02-03-2008, 12:34 PM
http://en.wikipedia.org/wiki/Delta_%28letter%29
http://en.wikipedia.org/wiki/Difference_operator

sbgtrading
02-03-2008, 03:36 PM
Ok, sorry, but here goes. Would someone be kind enough to explain/define, for me, the term "Delta", as it is described and used in this thread?

Thank you very much.

Stan

Hi Stan,
These indicators are plotting the "difference" between what is considered buy volume and sell volume. Delta is just the difference.

pdawg
02-03-2008, 09:42 PM
SBGtrading- Great work! I installed 6.5 to try this out as I have been wanting to implement this indicator for a while now. Ran it on a couple of days worth of replays on an 89t chart. Seems like a promising tool for catching the divergences(used the beta version below). 10 tick targets were very doable. Look forward to working with this indicator, thanks for your contributions to the NT community.

samiam30
02-04-2008, 07:54 AM
Here is a screeenshot of the new cummulative uptick/downtick delta indicator:

http://i239.photobucket.com/albums/ff304/samiam30/Snap1-30.jpg

It seems to be ploting the delta for each time period instead of the cummulative number.

JeffGus
02-04-2008, 10:55 AM
This work that you have put up here is excellent, but can you just a brief math example to show how these unit deltas are being calculated. Lets us the ER2 for example.

A Bid is hit with 5 lot...that is -5 deltas? An offer is taken with 10 lot so that +10 and a net of +5?

Do you take into consideration if the next trade is still at the offer with a 5 lot but this is not an uptick, but an equal tick but is still on the offer and would be a +5 count..so out net now goes to +10?

And than what time will this start over on one min chart 59 secs 00 sec or 01 sec?

I just want to get this straight as I use this in conjunction with program our programmer uses that uses the footprint concept form MD and would like to get the two in sync.

Here is my example to figure this out. I used time and sales and counted up the trades on bid and offer and starting at 00 sec my count came to +19 while the delta counter in the top left only got to +12...thus trying to find the issues here.

Thanks again for contribution.

sbgtrading
02-05-2008, 06:27 AM
New (corrected) file has been attached to Post#46


Ben

samiam30
02-05-2008, 06:44 AM
Thanks sbtrading, it appears to be working fine now.

samiam30
02-05-2008, 08:14 AM
Here are a couple of screenshots of the updated version plotted in the same window as the cummulative Bid/Ask delta (it's interesting that the numbers are quite different):

http://i239.photobucket.com/albums/ff304/samiam30/Snap1-31.jpg
http://i239.photobucket.com/albums/ff304/samiam30/Snap1-32.jpg

Gibby
02-28-2008, 11:42 AM
It would be awesome to be able to set an average period to apply to delta (for example to apply to a volume chart) to see if the average say 10 period delta is either buy or sell biased in a histogram format.

Fulcrum
02-28-2008, 01:43 PM
It would be awesome to be able to set an average period to apply to delta (for example to apply to a volume chart) to see if the average say 10 period delta is either buy or sell biased in a histogram format.

I currently do this with Investor RT "Volume Breakdown" tool....sshhhhhh! ;)

sbgtrading
02-29-2008, 05:57 AM
Hi Gibby...I'm not sure I follow your suggestion...are you saying just put a SMA on the current Cumulative volume line?


It would be awesome to be able to set an average period to apply to delta (for example to apply to a volume chart) to see if the average say 10 period delta is either buy or sell biased in a histogram format.

Gibby
03-01-2008, 10:07 AM
No, I am trying to get a moving average of net buying or selling volume over a user defined period of time, such as 10 periods. This way as price moves up or down we can see if there is on average more or less net buying or selling coming into the market.

sbgtrading
03-01-2008, 11:07 AM
So, you want the 10-bar average of buy volume plotted, and the 10-bar average of selling volume plotted. Or, do you want the 10-bar average of the net (buy minus sell) volume? Both are possible, the first is two moving averages and the second is one moving average.

Buy Volume, Sell Volume , Net
10, 2, 8
3 , 10, -7
4 , 100, -96
6 , 20, -14
1 , 10, -9
70 , 5, 65
10 , 6, 4
10 , 10, 0
8 , 40, -32
10 , 10, 0
10 bar Avg Buy, 10 bar Avg Sell, 10 bar Avg net,
13.2, 21.3, -8.1

Ben


No, I am trying to get a moving average of net buying or selling volume over a user defined period of time, such as 10 periods. This way as price moves up or down we can see if there is on average more or less net buying or selling coming into the market.

Gibby
03-02-2008, 08:59 AM
I think the net buying or selling per bar (delta) is the most important, so a moving average of the net makes the most sense to me. Say green histogram above a zero line while the net is positive and red below. And if there was an option to just show the basic delta per bar in the same manner, you could look at your chart and add up the total delta on a price move up over a defined range, versus the total delta on a price move down over a similar sized nearby range, to get a clue as to whether the next move will be a continuation or a reversal based on the total delta difference over those compared ranges. For example. if the first move was up and the second move was down and there was much less total selling delta on the way down than there was total delta buying on the way up, plus the latest per bar delta is turning positive again, it's more likely price will go back up, rather than continue down.

Gibby
03-02-2008, 09:11 AM
Showing the percentage of sell volume as compared to the percentage of buy volume of the total volume per bar is very telling information to have as well if there is some way to display that in addition to the net (delta). But that information is most valuable if it's shown at each traded price level like in the Dome format, so that may be a wish list project for the Ninja programmers.

Fulcrum
03-02-2008, 10:19 AM
MA's of Cumulative Delta or the Intrabar Delta are exceptionally useful (per what was shown by 5Pillars from Elitetrader.com in one of the examples at charthub.com ( http://www.charthub.com/images/2007/02/22/ES_317_CDBars ). There may also be an example from this video of the "VB" tool ... http://www.linnsoft.com/videos/vb/index.html .


This is what is meant by having a "MA" of the plotted DELTA information. :)

Gibby
03-02-2008, 03:19 PM
Heck, why not just code the delta divergence indicator for Ninja and cut right to the chase.
http://www.marketdelta.com/recordings/Delta%20Divergence.html

Gibby
03-02-2008, 04:22 PM
And here's the .pdf to explain how it is calculated with some examples also showing the delta histogram.

http://www.marketdelta.com/kb/attachments/Delta%20Divergence-GUIDb21b1a95d7284f878b08af4c7c8368b4.pdf

Angel
03-03-2008, 07:19 AM
Hello Sbgtrading and all,

I hope that everybody on this board enjoyed the week end.

Is it possible to add 2 horizontals lines as a feature for marking where the most extreme Buy/Sell volume value are located ?

Thanks for all

Happy trading

Cheers

Angel

sbgtrading
03-03-2008, 08:25 AM
If anyone would like MA's added to the existing Cumulative Delta Bid/Ask volume indicator (or the Cumulative Uptick/Downtick volume indicator as well), it is available at the tweak price of $15.

On another note, I'm working on a big enhancement for both cumulative volume indicators. The enhancement will store the historical cumulative values and then provide a way to reload them in the event of accidental program/chart termination, or for simple historical review. Let me know if this interests you. It's a huge program change and I will devote time to it only if there's interest. The cost is estimated at $250.

MA's of Cumulative Delta or the Intrabar Delta are exceptionally useful (per what was shown by 5Pillars from Elitetrader.com in one of the examples at charthub.com ( http://www.charthub.com/images/2007/02/22/ES_317_CDBars ). There may also be an example from this video of the "VB" tool ... http://www.linnsoft.com/videos/vb/index.html .


This is what is meant by having a "MA" of the plotted DELTA information. :)

sbgtrading
03-03-2008, 08:32 AM
Gibby,
Actually, I have this indicator available for sale in NinjaScript. The price is $95 and should be available within the week (I'm doing final testing). It's flexible enough to let the user set the lookback period for the high/low price search, so you're not handcuffed with looking for divergence at the DAILY high or low, you can set it to be any number of bars.

Ben

Heck, why not just code the delta divergence indicator for Ninja and cut right to the chase.
http://www.marketdelta.com/recordings/Delta%20Divergence.html

Fulcrum
03-03-2008, 11:35 AM
SBGTrading....my friend you do brilliant work, just wanted you to know that! :)


Gibby......I just saw the marketdelta.com video for the first time....LOL!!!

Someone finally programmed one of the set ups 5Pillars always uses...thanks for the link, that was cool to see. :D

sbgtrading
03-03-2008, 12:15 PM
Gibby......I just saw the marketdelta.com video for the first time....LOL!!!

What are you laughing about? Could it be the pricetag on the MarketDelta indicator? Wow...$499? Well...hey, I guess if it makes you $500 profit per trade, it's worth it. Now I know my indicator is more "economically priced"...but if you're landing $500 per trade, don't hesitate to give your programmer friend(s) a nice tip at the end of the week. ;)

Wow...$499...they must be giving away $20 bills somewhere! (oh, so that's what the subprime mess is all about!)

(by the way, thanks for the "brilliant" compliment!)

Ben

Fulcrum
03-03-2008, 02:12 PM
Yes I find it funny they have copied exactly what 5Pillars has done for a few years now....hey, that is the trading world....LOL! :)

I agree the MD.com pricing is way too high.

grd974
03-04-2008, 10:59 AM
Hi Fulcrum,

Could you elaborate on the 2007/02/22/ES_317_CDBars chart : where is the Delta information ?
. which one is the Delta moving average : the green/red or the pink/purple one ?
. what does a Delta candle mean ? Provided you can only have one delta value = buy volume - sell volume, how could it be illustrated it by a candle real body which shows up one close and one open values ?

Fulcrum
03-04-2008, 04:06 PM
The "pane" below price from that example is the Cumulative Delta displayed as candlesticks (OHLC of the CD during the life of each price candle formed off 317 ticks of price). There are two separate MA's overlayed on the CD candlesticks that are set at two different settings (one fast and one slow) derived from the CD candlestick plot....real simple actually, nothing too special there.

The pane at the bottom is a typical price based indicator, the TSI or Ergodic. This is derived from price ONLY (no delta input to this indicator) and is somewhat better than a MACD imo. :)

grd974
03-04-2008, 07:19 PM
Thanks for that accurate answer.

commodity_trader
03-06-2008, 12:28 AM
Thanks Sbgtrading for contributing this code. I appreciate it.

Sbg, or anyone using this, I am familiar with delta of a bar (ask-bid volume for that particular bar as said in MD). Does this Ninja indicator show the same results, as delta for a bar, as given by the VBI indicator in MD? I tried the indicator that Sbj posted near start of thread in Ninja and it is plotting a continuous line in panel2. I compared it with the MD delta for like a 1 min ES chart, but the delta values for each bar appear to differ sometimes and match sometimes. I hope I am doing something wrong, because I really want to use it on Ninja.

Here is the chart for a 1 min ES chart on 3/6/08 morning around 2:00 am EST. Note that at 2:06 am EST, delta as shown in Ninja appears to be around +250. But the MD version shows it as around +150.

http://i32.tinypic.com/28k1v7q.jpg

Can anyone please correct me if I am doing anything wrong in loading the DeltaBuySellVolume(BR) indicator?

Thanks
Commodity_trader

pdawg
03-06-2008, 01:37 AM
I think you are looking for a bar histogram instead of a line plot. Just Change it to a bar plot in the indicator settings.

sbgtrading
03-06-2008, 02:29 AM
Here is the chart for a 1 min ES chart on 3/6/08 morning around 2:00 am EST. Note that at 2:06 am EST, delta as shown in Ninja appears to be around +250. But the MD version shows it as around +150.


I don't think you're doing anything wrong in loading the indicator...but all my testing showed that this indicator is working correctly. I'll take a look at the raw time and sales data vs. the indicator output and see if there's a discrepancy. And then there is a chance that the MD version is incorrect...we need to get to the bottom of this.

It also could be the way that data is presented to the Ninja platform vs. the way Market Delta gets their data. Basically, both of these indicators hinge on the timing of the change of the Bid and Ask prices. For example, if a large volume transaction comes in at the Bid price on NinjaTrader, it's recorded as sell pressure as it should, but if that same large volume transaction comes on MD and the Bid price has moved lower in a split second, MD doesn't record that large volume transaction as a transaction at the Bid. I'm just kicking around ideas here, but I'm thinking it's one feasible explanation.

Ben

commodity_trader
03-06-2008, 08:55 AM
Thanks Sbgtrading for confirming I am loading the indicator properly.

One question is, MD plots/records the delta after the bar is complete. Say for example if delta of say like a 1 min bar, goes up to like 1000 and then falls back to 500,it plots delta as 500 and doesn't show up 1000 in the plot. Plotting 500,which is the actual delta of the 1 min bar is correct I believe. Does this indicator also plot the same way the final delta of the bar? Is it possible to plot this as a histogram on panel 2, instead of continuous line.

Thanks
Commodity_trader

sbgtrading
03-06-2008, 09:12 AM
The NT bid/ask cumulative number is updated on each transaction and plotted as such. As you say, MD plots it only after the bar is closed out. So in that way, the two plot differently. The resolution of this "situation" is yet to be achieved.

To answer to your question is yes, you can plot the cumulative delta as a histo very easily, but switching the Plot to "Bars" instead of "Line. You'd probably want to set the DeltaUp and DeltaDown plots to "Transparent" in color so they don't overprint the new Cumulative histo you've created.

Ben

One question is, MD plots/records the delta after the bar is complete. Say for example if delta of say like a 1 min bar, goes up to like 1000 and then falls back to 500,it plots delta as 500 and doesn't show up 1000 in the plot. Plotting 500,which is the actual delta of the 1 min bar is correct I believe. Does this indicator also plot the same way the final delta of the bar? Is it possible to plot this as a histogram on panel 2, instead of continuous line.

Mavrik00
03-11-2008, 08:02 AM
I am interested in testing this indicator as well, however, I do not know how to use this text file that is attached to import into NT 6.5 and use as an indicator.

Could someone point me in the right direction on how to use this today? Thanks in advance!

Joe
InTheTrade@Gmail.com

sbgtrading
03-11-2008, 08:15 AM
Hi Joe,
Any ZIP indicator file can be Imported by the NinjaTrader Control Center.

1) Download the ZIP file to your desktop or wherever
2) On the NT Control Center, click on File > Utilities > Import NinjaScript
3) Click "Yes" if you believe the content to be trustworthy
4) Find the ZIP file in the dialog

Ben


I am interested in testing this indicator as well, however, I do not know how to use this text file that is attached to import into NT 6.5 and use as an indicator.

Mavrik00
03-11-2008, 08:30 AM
Thanks for the help, where can I find the most recent version of this indicator?

sbgtrading
03-11-2008, 08:49 AM
Here they are:
http://www.ninjatrader-support.com/vb/showpost.php?p=24809&postcount=25
http://www.ninjatrader-support.com/vb/showpost.php?p=24809&postcount=46

Thanks for the help, where can I find the most recent version of this indicator?

Mavrik00
03-11-2008, 08:57 AM
Sorry for cluttering up this thread with these short posts....

I found the file I needed, however, does anyone have information on how to use this thing? Ive got it loaded on my charts and it appears to be working...now...what is this stuff telling me? hehe.

thanks in advance to the group!

Joe
InTheTrade@Gmail.com

Ricardo Salas
04-09-2008, 07:30 AM
Hi Sbgtrading:

Thanks a lot for this indicator. I would like that you add the possibility to remove the dots and to leave only the indicator due to the scale problems.

Additionaly, Is there any possiblity to draw this indicator with candles sticks instead of a continuos line???

Cheers

Ricardo





Hi Joe,
Any ZIP indicator file can be Imported by the NinjaTrader Control Center.

1) Download the ZIP file to your desktop or wherever
2) On the NT Control Center, click on File > Utilities > Import NinjaScript
3) Click "Yes" if you believe the content to be trustworthy
4) Find the ZIP file in the dialog

Ben

sbgtrading
04-10-2008, 06:48 AM
Hi Sbgtrading:

Thanks a lot for this indicator. I would like that you add the possibility to remove the dots and to leave only the indicator due to the scale problems.

Additionaly, Is there any possiblity to draw this indicator with candles sticks instead of a continuos line???

Cheers

Ricardo

Hello Ricardo,

You are free to remove the dots by changing their output color. Pull up the indicator parameter screen (Ctrl-I), and change the output color to 'Transparent'.

About your request for candlestick output instead of continuous line, I'm sorry to say that is not possible at the moment. If you would, please suggest that enhancement to the NinjaTrader staff. Perhaps it can be included in a future version of NT.

Ben

Ricardo Salas
04-11-2008, 06:31 AM
Thanks Ben fo your answer.

I did not explain well what I wanted in my last post.

If I remove the dots by doing what you suggest, that wont help a lot, because the dots are still placed there and they would not let the indicator to fit automatically with the scale when I choose false in the auto scale option. When the dots are there, the indicator consider the dots and the continuos line and fit both but unfortunately this reduce the size of the continuos line.

Cheers

Ricardo





Hello Ricardo,

You are free to remove the dots by changing their output color. Pull up the indicator parameter screen (Ctrl-I), and change the output color to 'Transparent'.

About your request for candlestick output instead of continuous line, I'm sorry to say that is not possible at the moment. If you would, please suggest that enhancement to the NinjaTrader staff. Perhaps it can be included in a future version of NT.

Ben

commodity_trader
04-14-2008, 06:05 PM
Hi Ben,

I have tested the indicator on 1 min ES overnight and they are not calculating the buyvolume/sellvolume/delta correctly. Did you happen to look at the indicator, what the problem might be. Do you think it is anything to do with OnMarketData function?

Thanks
Commodity_trader

sbgtrading
04-14-2008, 11:26 PM
ATTENTION:

I've posted a new version of this Cumulative Delta indicator to Post#1 of this thread. Please visit there and download (and test) this version.

Thank you,
Ben

TiP2012
04-29-2008, 02:53 PM
Hi Ben,

Firstly thanks so much for sharing this indicator. Its very much appreciated.

I have been playing around with it for about a week now. I noticed that there is a big difference between the shape of the chart of cumulative volume delta (bid / ask) between when it is plotted real time on live data and when I replay the data with the market replay tool.

Have you experienced somthing similar? I am using a multi broker license with ZenFire as the primary feed and Interactive Brokers as backup / secondary. The only thing I can think of is that as IB is not a true real time feed, that when the market replay occurs NT takes the tick data from a different source. Is this possible?

Thanks.

TiP2012

PS - I can post some saved charts tomorrow as an example if you wish.

sbgtrading
04-29-2008, 07:32 PM
Very interesting...I'll take a look at that. I had not observed the data stream in the market replay function. Since you're using the same indicator on both the live data and the market replay data, my only guess is that the market replay data is different in some way...perhaps the bid/ask values are different? It's worth looking into.

Thanks for the report!

Ben


Hi Ben,

Firstly thanks so much for sharing this indicator. Its very much appreciated.

I have been playing around with it for about a week now. I noticed that there is a big difference between the shape of the chart of cumulative volume delta (bid / ask) between when it is plotted real time on live data and when I replay the data with the market replay tool.

Have you experienced somthing similar? I am using a multi broker license with ZenFire as the primary feed and Interactive Brokers as backup / secondary. The only thing I can think of is that as IB is not a true real time feed, that when the market replay occurs NT takes the tick data from a different source. Is this possible?

Thanks.

TiP2012

PS - I can post some saved charts tomorrow as an example if you wish.

TiP2012
04-30-2008, 10:06 AM
Hi Ben,

Today I am running the indicator on two computers, one with a real time ZenFire feed and the other one with real time ZenFire (primary connection - connected first) and Interactive Brokers feeds.

There is a big difference between the two charts when in theory they should be identical. I also have a Buy/Sell Volume indicator on both systems and this one does look identical.

A possible explanation is that the Delta indicator on the ZenFire / IB computer is being calculated from the bid / ask / trade data from the secondary feed from IB. As IB aggregates their tick data this would account for the difference.

At the end of the day I will run the replay on the machine with the ZenFire only feed and see if there is a difference in the cumulative total at the end of the day and let you know the result.

TiP2012
04-30-2008, 04:12 PM
Hi Ben,

I have attached 3 charts:
1. Real time chart with Cumulative Bid Ask volume and delta as collected with ZenFire feed.
2. Market Replay chart of Cumulative Bid Ask volume and delta as collected with ZenFire feed.
3. Real time chart with Cumulative Bid Ask volume and delta as collected with ZenFire primary feed and Interactive brokers backup feed.

As you can see charts 1 and 2 are almost exactly the same. There are small differences visually and what you cannot see from the charts is the final cumulative delta value for the live feed was almost half that of the market replay (-1109 vs around -2000 contracts). This would seem more like a scaling problem that pops up during the replay. No ideas how to explain that one.

Chart 3 (the chart with the black background) is quite different from the other two in the shape of the cumulative delta. You can see it looks like it is using different values to calculate the delta as shown by the two blue circles marked on the chart. There is a large discrepancy between the delta calculated and the corresponding buy / sell volume indicator. This suggests to me that the delta indicator is picking up the IB feed trade data for the calculation.

commodity_trader
05-01-2008, 08:57 PM
Hi Ben,

Thanks for the updated version of cumulative delta. I tried to test this, but the cumulative version is harder to test.

Would it be possible you can post theupdated version of indicator which plots the delta (column delta, which is "ask-bid" volume for the particular bar) of the bar as a histogram,after the bar is complete. It would be easier to test this and would be helpful. Trying to test this using a 1 min overnight ES time and sales.

Thanks
Commodity_trader

pdawg
05-02-2008, 01:52 AM
Why not just set the bid/ask delta to a bar instead of dot in the indicator settings? Also you can set the cumulative to transparent if you just want the Delta Diver bars.

commodity_trader
05-02-2008, 06:58 AM
Hi Pdawg

Thanks for the suggestion. But do you know, if the dot is printed as "column delta" value after bar is completed? So that it represents the delta of the particular bar, after the bar is complete.

Thanks
Commodity_trader

sbgtrading
05-02-2008, 07:06 AM
Excellent info Tip2012...thanks for the work you've contributed on this one. I'm going to have to think about this one a little more.

Also (CommodityTrader and Tip2012), what I'll do is program a new version that dumps the raw data the indicator receives to a text file. And, if you like, I can dump the resulting calculated values to another text file if you want to be able to refer to the actual numbers (with timestamps on them).

Let me know,
Ben

commodity_trader
05-02-2008, 09:07 AM
Hi Ben,

Yes, that would be helpful for testing purposes. Also if you can give a user option or anything similar to just plot the "column delta" (after the bar is complete) of the bar as histogram it would be helpful too.

Thanks
Commodity_trader

pdawg
05-02-2008, 10:41 AM
Hi Pdawg

Thanks for the suggestion. But do you know, if the dot is printed as "column delta" value after bar is completed? So that it represents the delta of the particular bar, after the bar is complete.

Thanks
Commodity_trader

Yes it is delta per completed bar not cumulative

sbgtrading
05-03-2008, 08:57 AM
Ok investigators...here's the data dumping indicator.

This indicator can create two text files in the file paths you specify. One for the Raw data it receives, and the other is the cumulative total it plots.

WARNING! This indicator appends data to the text files you specify for output. This means it writes to your harddrive! Take caution to ensure you type the correct file names into this indicator. You are responsible for the file names you specify! MAKE SURE YOU CHOOSE FILE NAMES THAT ARE NOT IDENTICAL TO EXISTING FILES THAT COULD BE DAMAGED BY THIS INDICATOR. Be warned!

(was that clear enough???)


Also, this indicator gives you the option to turn-off/on the cumulative calculation all together.

Finally, if you do not want to create either of the two text files, just blank out the file paths given as parameter inputs.


Ben

TiP2012
05-04-2008, 05:18 AM
Hi Ben,

On Friday I ran the indicator on two separate machines with two separate internet connections, the images are the first two images attached. As you can see from around 12:00 to 13:30 the cumulative delta line on these charts is moving in oppopsite directions (the delta bars as well). Then at the end of the day I ran the market replay on the two machines which I have attached as the third chart. This turned out to be identical between the two machines.

I'm living in Buenos Aires, Argentina at the moment, so I figured the likely cause of the discrepancy is in the internet connection quality. After running some tests I verified that the ping times for the connections are definitely different and also that sometimes they have packet loss to US servers.

This would suggest then that the problem is caused by delays in the ticks arriving and ticks not arriving in the correct sequence. This would be correct if:
a. The bid / ask information and the ticks confirming volume transacted at price are sent separately.
b. When the indicator is calculated real time, the time stamps from the exchange sent with the ticks and the bid / ask are ignored. NT calculates the delta by comparing the tick price with the current bid / ask available at that time.

On the other hand, when the ticks and bid / ask are recorded in the database, they seem to be recorded with the timestamps sent from the exchange.

I have know idea if the assumptions above are correct, however if they are, then the only way to ensure that the delta's and cumulative delta are 100% correct would be to read the values from the NT database instead of recording them live. To make it accurate this would need to occur with say a 1 - 2 second delay to ensure that all ticks are in. Anyone who has a better internet connection than I do should have results which look a lot more like the market replay files.

What do you think?

Grtz,

TiP2012

sbgtrading
05-04-2008, 07:30 AM
Awesome job Tip2012!

It's going to take all of us some time to think about your info...thank you so much for the stellar effort!

Ben

nickels&dimes
05-04-2008, 02:33 PM
Have any of you guys done a "screener" for lot sizes? For instance, on the US Ten Year Note market (and the ES) the Delta on large lot sizes can be more accurate. The delta > 99 contracts screens out a lot of small traders. I know a few delta traders that compare the large lot size deltas against the total etc. Supposedly it gives a better edge?

pdawg
05-05-2008, 07:45 PM
I've heard of that as well and wouldn't mind seeing that as an option.

commodity_trader
05-08-2008, 05:58 PM
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

NinjaTrader_Josh
05-09-2008, 02:08 AM
I would check the e.MarketDataType with MarketDataType.Ask or .Bid first. Then aggregate Volume based on the Price after I determine the Market Data Type.

Pepperdog
08-09-2008, 03:49 PM
Any recent developments on this? It seems this thread has died out.

So far I have tracked down 2 of Ben's indicators (thanks for creating them!): the CumulativeVolumeOrTick from this thread, and another DeltaBSVNormalized indicator, which includes an EMA line (not sure where I found this one). Can someone point me towards a non-cumulative version of the first? I guess that would be the original version of the Cumulative one?

Thanks.

rally
08-09-2008, 05:46 PM
Hi Ben,

Just found this indicator. This indicator looks very similar to the CVD indicator in trading technologies X-Trader, is it the same or a similar idea?

rally
08-10-2008, 02:49 PM
Hi Jack,

The bad news is this indicator, like all bid/ask volume indicators in NinjaTrader, requires live data to be gathered. It doesn't work with historical data. In other words, you must load this indicator early in the day, then as time (and trade activity) passes, the data will be gathered and the indicator output will be relevant.

Also, be aware, that any recalculation of indicators on that chart will ZERO-OUT any gathered data. There has been quite a bit of discussion on this forum concerning this and the use of globals to retain this type of data. Hopefully, that will get resolved. Until then, be aware of this limitation.

Ben

A question for the NT staff, is there a fix in the pipeline for this problem?

This is a real problem because you have to have so many charts open etc to gather this data and it's really depressing to lose it all just by closing a chart:(

NinjaTrader_Dierk
08-10-2008, 11:34 PM
NT7 will manage historical bid/ask data. Beta by the end of this year.

timmyb
08-11-2008, 05:07 PM
I have to strongly agree, if i want to add antoher indicator i lose all live values, absolutely rediculous. Especially having to wait 6 months for a fix.:(

greentrader
08-12-2008, 02:06 PM
Hi all. I just wanted to verify that code such as the following was the proper way to accumulate net bid/ask volume from within OnMarketData:

if (e.Price >= e.MarketData.Ask.Price)
netVol += e.Volume;
else if (e.Price <= e.MarketData.Bid.Price)
netVol -= e.Volume;

when e.MarketDataType == MarketDataType.Last

In other words, does "e.Price" contain the last trade price, and e.MarketData.Ask.Price and e.MarketData.Bid.Price the last reported ask and bid prices? And should such trades seen in OnMarketData exactly match those seen in NT's T&S window? Or are there some timing issues I'm unaware of? Thanks.

------------
Also, when Josh wrote,

"I would check the e.MarketDataType with MarketDataType.Ask or .Bid first. Then aggregate Volume based on the Price after I determine the Market Data Type."

Does that mean that it's best to track bid and ask via the routine's bid and ask messages, rather than using e.MarketData.Ask/Bid.Price? Or is the "current" bid/ask at the time of a trade best obtained in some other way?

-------------
I see that NT Ray answered this question a few months ago:

- Create bid/ask price variables outside of OnMarketData()
- Monitor OnMarketData() to update these variables
- Monitor OnMarketData() for the last price event and compare this price to the variables to determine whether to add/subtract from delta

Have rewritten routine to follow that advice and will compare results to NT's T&S window tomorrow...

greentrader
08-13-2008, 08:00 AM
Verified that NT Ray's approach agrees with T&S window for ES, NQ, and ER2:

- Create bid/ask price variables outside of OnMarketData()
- Monitor OnMarketData() to update these variables
- Monitor OnMarketData() for the last price event and compare this price to the variables to determine whether to add/subtract from delta

fy260498
10-23-2008, 09:44 PM
Hi sbgtrading,

This is Yusuf. As usual wanted to appreciate your work as I recently saw the Delta BuySell Volume Indicator that seems to serve some purpose in refining the entry point of a trade. Thanks for that. I just wonder if you can add an option to define the lot size as well as the user input. For example allow a set of 3 user variables where the user input would consist of lot sizes. Lets say I use the inputs to be 50, 100 and 200. This means I am looking at this indicator to plot 3 Delta Buy Sell Volume Dots for lot sizes greater than 50, 100 and 200 respectively with a possiblity of configuring the size an color of the dots to be plotted. This would be great as it would isolate big traders from others and give us an info as the market is long or short in terms of big players with respect to small players. See if you can do that or atleast let me know if that is possible so that I will try it out.

Thanks anyways,
Best regards,
Yusuf SHAIKH

trader65
10-24-2008, 05:23 AM
hi sbgtrading,
great work.....i noticed the cumulative delta line (curve) is not updated on last candle....is it possible to change that so we have it update to the last tick? also it would be great if we could plot that line as a candle or ohlc bar so we could see the pressure during last price bar is forming....great indicator to spot divergencies afterall...many thanks.

kon

trader65
10-24-2008, 10:54 AM
Everything that works in 6.0 should work in 6.5...the problem is that not everything that works in 6.5 works in 6.0. They are not backward compatible.

Ben


hi sbgtrading,
great work.....i noticed the cumulative delta line (curve) is not updated on last candle....is it possible to change that so we have it update to the last tick? also it would be great if we could plot that line as a candle or ohlc bar so we could see the pressure during last price bar is forming....great indicator to spot divergencies afterall...many thanks.

kon

jasonf
11-22-2008, 12:45 PM
like only use order of 200 or more contracts (you pick). and only plot the delta buy/sell from orders of that size.

anyone know how to edit the code for this?

Pepperdog
11-23-2008, 08:25 AM
anyone know how to edit the code for this?

I added a variable to define the volume limit (Vol_Lim in my code), then went and changed the if statements in the OnMarketData section of the code by adding a second condition to the IF statement, like so:

if(ctype == CVOTL_OutputType.BidAskVolume)
{
if ((e.Price >= e.MarketData.Ask.Price) && (e.Volume >= Vol_Lim)) { buys += e.Volume; Total += e.Volume; }
else if ((e.Price <= e.MarketData.Bid.Price) && (e.Volume >= Vol_Lim)) { sells += e.Volume; Total -= e.Volume; }
}
else if(ctype == CVOTL_OutputType.UpDownTickVolume)
{
if(e.Price > LastTransactedPrice) Direction = 1;
if(e.Price < LastTransactedPrice) Direction = -1;
if((Direction == 1) && (e.Volume >= Vol_Lim)) { buys += e.Volume; Total += e.Volume; }
if((Direction == -1) && (e.Volume >= Vol_Lim)) { sells += e.Volume; Total -= e.Volume; }
LastTransactedPrice = e.Price;
}
else if(ctype == CVOTL_OutputType.TickCount)
{
if((e.Price > LastTransactedPrice) && (e.Volume >= Vol_Lim)) { buys++; Total++; }
if((e.Price < LastTransactedPrice) && (e.Volume >= Vol_Lim)) { sells++; Total--; }
LastTransactedPrice = e.Price;
}

It seems to work fine, but I've not really tested it or been using this indicator until NT will not lose the data on a chart/indicator reload. Hopefully version 7 corrects this and will appear soon!

commodity_trader
11-25-2008, 12:30 AM
Hi PepperDog,

Can you please post the version you have in .zip form, so that one of the users can test it and compare it to like Time and Sales (possibly during slow After hours) to see if it is calculating delta correctly.

Thanks
Commodity_Trader

alleillo
11-28-2008, 12:26 PM
could someone explain me what kind of informations give more time and sales respect the book?

trader65
11-28-2008, 01:07 PM
hi sbgtrading,
great work.....i noticed the cumulative delta line (curve) is not updated on last candle....is it possible to change that so we have it update to the last tick? also it would be great if we could plot that line as a candle or ohlc bar so we could see the pressure during last price bar is forming....great indicator to spot divergencies afterall...many thanks.

kon

Pepperdog
11-28-2008, 02:50 PM
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.

commodity_trader
11-28-2008, 06:43 PM
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

Pepperdog
11-28-2008, 07:10 PM
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.

T2020
11-30-2008, 11:31 AM
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

Pepperdog
12-02-2008, 07:26 PM
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?

sbgtrading
12-02-2008, 08:50 PM
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).

Pepperdog
12-03-2008, 04:24 AM
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?

sbgtrading
12-03-2008, 07:07 AM
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?

commodity_trader
12-04-2008, 09:33 AM
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.

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

Pepperdog
12-04-2008, 07:44 PM
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.

jfw215
03-03-2009, 11:31 PM
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

NinjaTrader_Bertrand
03-04-2009, 05:14 AM
Welcome to our forums JW - did you give the last modification by Pepperdog a try?

meyer99
03-04-2009, 11:00 AM
What is the final resolution? Does the indicator posted last by sbgtrading work on a tick chart using bid/ask vol?

subterfuge
03-04-2009, 03:58 PM
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

jfw215
03-04-2009, 10:58 PM
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

jfw215
03-05-2009, 12:16 AM
actually i just did some backtesting and the numbers seem to add up correctly.

Pepperdog
03-05-2009, 03:27 AM
I've done quite a bit of work with this code, and believe it does miss some ticks / volume. It is very close, but might not catch 100% of transactions.

Not sure if this was due to my modifications or not, but the base code for determining and calculating buys, sells & corresponding volume was not changed. I made a version that reported the per bar delta, and displayed both buy & sell volume as bars. On a constant volume bar chart, you can soon see that the buy + sell bar total does not always equal the volume bar total.

rokafella
03-12-2009, 12:15 AM
NT7 will manage historical bid/ask data. Beta by the end of this year.
Well? Where is it? When can we expect the v7?:D

NinjaTrader_Vincent
03-12-2009, 06:19 AM
Planned Beta release for V7 is scheduled for the second quarter of this year.

chuckt101
03-16-2009, 10:54 AM
FYI, I downloaded the code posted by Pepperdog on 11/28. I apologize if this has been discussed however I will assume it hasn't since the issue is still evident in the code. Long story short, the code is not correct. It is comparing the last sale to bid/ask incorrectly. Rather than determining the bid/ask prices *prior* to the sale, it is doing it at the time of the sale. Subtle but significant difference.

See this thread for the proper approach. http://www.ninjatrader-support2.com/vb/showthread.php?t=10288

That being said, I've developed a cumulative delta indicator per NT instructions however I'm being told from someone using IRT this is still incorrect. Having double and triple checked my logic, I'm at a lost as to why NT remains inconsitent with the IRT display.

NT: please comment on this logic:
Grab ask/bid prices each time they change (using OnMarketData == Ask/Bid)
Grab sales each time they go through (using OnMarketData == Last)

Compare sale price to ask/bid price
Update delta with new sale. (e.g. if sale was @ bid, subtract vol from delta. Vice versa for ask)

Is this correct?

NinjaTrader_Josh
03-16-2009, 10:58 AM
chuckt101,

We cannot comment on how this custom indicator is suppose to work or if it is working or not. This is a matter you need to bring up with the original author.

As far as delta logic goes, we are not delta experts either and could not advise you on how to calculate it.

chuckt101
03-16-2009, 11:05 AM
chuckt101,

We cannot comment on how this custom indicator is suppose to work or if it is working or not. This is a matter you need to bring up with the original author.

As far as delta logic goes, we are not delta experts either and could not advise you on how to calculate it.

Thanks for your response. FYI I coded mine from scratch; My question is not directed at how the posted code works nor how to fix it...

Disregard delta logic; Am I grabbing ask vs. bid sales correctly? This is something you show in T&S and have previously addressed in the post I linked. Like I said, the result was not what I expected and hence was wondering if there is a bug or incorrect information passed by your staff previously.

NinjaTrader_Josh
03-16-2009, 11:12 AM
You need to store bid/ask prices in your own variables. Then as you receive a last event you can compare it against your stored variables.

subterfuge
03-18-2009, 01:57 PM
Sbgtrading. Great job on the indicator.
However, some people on this forum have suggested it is not QUITE right.
I dont have a CLUE about coding ect, but someone posted the following hint on how to fix it:
if (e.MarketDataType == MarketDataType.Last){
curTick = e.Price;

if (curTick >= askPrice){
deltaVol += e.Volume;
}

if (curTick <= bidPrice){
deltaVol -= e.Volume;
}

}
else if (e.MarketDataType == MarketDataType.Ask){
askPrice = e.Price;
}
else if (e.MarketDataType == MarketDataType.Bid){
bidPrice = e.Price;
}
Can you make heads or tails of this?
If so, and you feel inclined to upgrade your version with the above code, would it also be possible to make the data candlesticks?

Thanks

chuckt101
03-18-2009, 02:03 PM
lol hey i'm more than just "someone" :p

sbgtrading
03-18-2009, 02:36 PM
The calculation method of this indicator has been changed...and the new version is now residing at Post #1 of this thread.

Also, the new indicator does let you specify a Minimum Volume per transaction, thereby letting you eliminate low volume transactions from the accumulation.

NOTE: If you're running this indicator and find the plot is not moving from the zero line, then you may have your MinimumVolume parameter value up too high. If it's too high, you will "miss" all trades below that volume level.

Enjoy!

T2020
03-19-2009, 06:01 AM
The cumulative line of this indicator does not update by tick . You can set the
" up date on bar close " to false and it still doesn't make any difference . Look
at it on a 1 min chart . The only time it moves is when a new bar starts . I
don't think it should be like this .

benstevens
03-19-2009, 06:25 AM
You could open a small time-frame tick chart like 20 ticks or smaller and you would be able to capture the rhythm of the volume, please try.

T2020
03-19-2009, 07:07 AM
Well , that's a work around . I think the Delta bars update by tick . Why not
the cumulative line ? I don't trade off a 20 tick and would rather see what's
happening on the time frame I trade .

sbgtrading
03-19-2009, 08:05 AM
Not a problem folks...I posted a new version that updates the cumulative line on every tick. The new indicator is attached to Post #1.

Enjoy!

Ben

T2020
03-19-2009, 08:33 AM
Not a problem folks...I posted a new version that updates the cumulative line on every tick. The new indicator is attached to Post #1.

Enjoy!

Ben
Thanks for the correction . Some day a Moving average of the cumulative
line would be nice . :)

subterfuge
03-20-2009, 08:56 AM
Thanks for the correction . Some day a Moving average of the cumulative
line would be nice . :)

And candlesticks:D

Good work tho. You guys are very clever to be able to do all this coding stuff:o

roonius
03-23-2009, 01:31 PM
And candlesticks:D

Good work tho. You guys are very clever to be able to do all this coding stuff:o

One with candlesticks you can try from here
http://tradingstudies.com/products/bidaskvolume.html

It's not free, unfortunately.

gomifromparis
03-24-2009, 09:57 AM
Hi,

I coded a version of Cumulative Delta, based on bid/ask volume.
It draws OHLC bars and candlesticks.
It should work with CalculateOnBarClose=true or false
It paints bars with Standard paint(comparison between open and close), Strong bars (compares close with previous high or low), or None.It has a lot less options than sbgtrading (http://www.ninjatrader-support2.com/vb/member.php?u=2300)'s indicator, but it draws candlestick, so if you want best of both worlds I suppose you'll have to do some code merging.

Anyway, if it can be of any help, please feel free to use.

vasuadiga
03-24-2009, 10:44 AM
Let me know if you notice any errors...

subterfuge
03-24-2009, 11:38 AM
2 brilliant first posts, Gomifromparis and vasuadiga!
Nice work guys.
Good luck

T2020
03-24-2009, 12:24 PM
Hi,

I coded a version of Cumulative Delta, based on bid/ask volume.
It draws OHLC bars and candlesticks.
It should work with CalculateOnBarClose=true or false
It paints bars with Standard paint(comparison between open and close), Strong bars (compares close with previous high or low), or None.It has a lot less options than sbgtrading (http://www.ninjatrader-support2.com/vb/member.php?u=2300)'s indicator, but it draws candlestick, so if you want best of both worlds I suppose you'll have to do some code merging.

Anyway, if it can be of any help, please feel free to use.

I'm liking it so far .:) Would you consider adding a zero line ?

CBpasQ
03-24-2009, 12:41 PM
2 brilliant first posts, Gomifromparis and vasuadiga!
Nice work guys.
Good luck

Agreed! Thanks gomi and vasua.

gomifromparis
03-24-2009, 05:24 PM
Thanks guys :)

He're an upgrade :
Bar style now derived from price style : you can change style from the main menu without losing the calculated CD data. OHCL, Candle and HiLo are implemented
Up/Down/Neutral colors are derived from the global Up/Down/Candle Outline colors , so you can also change colors without losing the calculated data !I didn't implement the zero because I don't really see the need for it, and I spent quite some time getting rid of the existing zero bar : the zero bar prevents you from beeing able to zoom between -55 k and -60 k, because it "wants" to be plotted.

Enjoy

Stone
03-24-2009, 05:29 PM
Thanks guys :)

He're an upgrade :

Enjoy

Awesome, great job on this! Thank you for sharing!

jfw215
03-25-2009, 07:02 AM
Thanks guys :)

He're an upgrade :
Bar style now derived from price style : you can change style from the main menu without losing the calculated CD data. OHCL, Candle and HiLo are implemented
Up/Down/Neutral colors are derived from the global Up/Down/Candle Outline colors , so you can also change colors without losing the calculated data !I didn't implement the zero because I don't really see the need for it, and I spent quite some time getting rid of the existing zero bar : the zero bar prevents you from beeing able to zoom between -55 k and -60 k, because it "wants" to be plotted.

Enjoy


Thanks Gomi!

T2020
03-25-2009, 04:19 PM
Thanks guys :)

I didn't implement the zero because I don't really see the need for it, and I spent quite some time getting rid of the existing zero bar : the zero bar prevents you from beeing able to zoom between -55 k and -60 k, because it "wants" to be plotted.
Enjoy
Your right , I see from watching it that it can get to + or - 60 k . Thanks
again for posting it . !

gomifromparis
03-26-2009, 07:18 AM
New Beta version : ability to record tick CD data, so you can press F5 whenever you want, add other indicators, and you can open other charts that will read the data already stored.

Data is stored in a file in "My Documents" folder which you can edit.

If you have market replay files, play them one after another and it will populate the CD file.

Performance might be an issue; the file structure is not optimized because human readable, but I'll have to see waht happens when it gets bigger.

Feel free to comment, but remember it's beta quality :)

T2020
03-26-2009, 09:20 AM
New Beta version : ability to record tick CD data, so you can press F5 whenever you want, add other indicators, and you can open other charts that will read the data already stored.

Feel free to comment, but remember it's beta quality :)

I think your solving one of the frustrating problems with real time
tick indicators . No memory . Good work !

gomifromparis
03-26-2009, 12:38 PM
Last update of the day : minor bug corrections, code comments, and file format set to UTC, so now people can use other people's files if necessary.

I sent a file containing march 24th, just unzip and copy it in My documents, then put up the indicator on an ES 06 chart, and the 24th CD should appear.

Enjoy :)

scottymoll
03-27-2009, 01:42 AM
Last update of the day : minor bug corrections, code comments, and file format set to UTC, so now people can use other people's files if necessary.

I sent a file containing march 24th, just unzip and copy it in My documents, then put up the indicator on an ES 06 chart, and the 24th CD should appear.

Enjoy :)

This is AWESOME Gomi!!! Thanks so much! Any chance you can post the file for the past week also, instead of just the 24th?

LuboLabo
03-27-2009, 05:38 AM
Sorry may this is a stupid question, but i never understand why is not possible use tick and bid ask history for indicators if a broker provide them.
Is it a lack of NT programm structures?

Thanks.

Lubo.

gomifromparis
03-27-2009, 05:52 AM
I guess bid/ask is not stored in the db.
I read it would available in NT 7 though

LuboLabo
03-27-2009, 06:18 AM
Thanks for reply Gom.
Your indicator is great!!!

Lubo.

LuboLabo
03-27-2009, 07:48 AM
Gom,
I tried it with market analyzer, with market repaly on, but when I open a chart it doesn't show past delta candles.
Should it work only with charts opened?

Thanks.

Lubo

gomifromparis
03-27-2009, 07:53 AM
Yes, it's the indicator that writes the data file, so you have to have a chart opened with the indicator in it while replay is running.

T2020
03-27-2009, 11:35 AM
Every consider adding a moving average to the indicator ?

gomifromparis
03-27-2009, 12:35 PM
Hi guys,

This is final version. I added a parameter to choose if the volume is reinitialized on session break, an indicator value so you can monitor it with databox(thanks vasuadiga), and a text to show id recording is OK or not. As only one indicator instance is allowed to write, you can have only one "recording OK".

Let's do a quick recap
CD calculation based on comparison with bid/ask.
Draws candlesticks, OHLC bars and HiLo bars
3 painting schemes : none, UpDown(comparison of close/open), and StrongUpDown(paint if close<previous low or close > previous high)
The 3 colors are derived from the following colors in the chart properties : Candle outline/Color, Color for down bars, Color for up bars.
Indicator parameter can be set to reinitialize CD on session break
Calculated CDs are stored in a file named like the instrument, in My Documents folder, providing history ability. Caution 1: time is stored in UTC. Caution 2 : the indicator can only write timestamps after the last timestamp in the file. If you need to write before, delete some lines in the file. Recording status is shown in indicator window.That's about it guys, now you're on your own :)

Happy trading to all!

http://img516.imageshack.us/img516/6700/gomcdfinal.png

scottymoll
03-27-2009, 01:11 PM
How do you get the same color scheme (green,red, and white) on the candles above? I can only change to green(up) and red(down) bars. I'd like to have the white also to match the GomCD indicator.

gomifromparis
03-27-2009, 01:20 PM
Color comes from the "Candle outline" color property. You have to set it to White (and of course choose StrongUpDown as Paint Type in the indicator's property screen)..

randyjb
03-27-2009, 03:05 PM
Color comes from the "Candle outline" color property. You have to set it to White (and of course choose StrongUpDown as Paint Type in the indicator's property screen)..

Hi Gomi.. and thanks for the nifty indicator.. really good work..

As to Scotty's question below.. I think he was looking for what indicator you used to paint the PRICE BARS for the ES so that they include white bars, not just the red and green. Switching the outline color in Properties will only change the outline color of Price Panel candlesticks and also inside bars that appear in your Gomi CD indicator.

It looks like you have an indicator called "palight" in your Price Panel that perhaps paints the price bars in the Price Panel so that they will match up with the three colors showing in your GOMI CD indicator example.

Are you perhaps willing to share the paint bar indicator for the Price Panel as well?

Happy Trading,
Randy

P.S. Pardon the perhaps silly question, but seeing as how I have never used a cumulative delta bid ask indicator before, is it the case that it will always lag price action by one bar because it has to wait to receive the info from the closed price bar in order to paint the cumulative delta bar or is the price action in the latest bar already incorporated into the cumulative bar that appears one bar back?

gomifromparis
03-27-2009, 03:56 PM
It looks like you have an indicator called "palight" in your Price Panel that perhaps paints the price bars in the Price Panel so that they will match up with the three colors showing in your GOMI CD indicator example.


It's really a simple indicator that shows strong up/down bars. It is not synchronized with the cumulative delta. It is really simple, so I won't share it. If you need it, time to do some homework guys and study some C# :)


P.S. Pardon the perhaps silly question, but seeing as how I have never used a cumulative delta bid ask indicator before, is it the case that it will always lag price action by one bar because it has to wait to receive the info from the closed price bar in order to paint the cumulative delta bar or is the price action in the latest bar already incorporated into the cumulative bar that appears one bar back?

The CD is calculated tick by tick, there is no lag.

superarrow
03-31-2009, 05:03 AM
Gomi,
Brilliant piece of work! Thanks a bunch.

Cheers,
SA

gomifromparis
03-31-2009, 05:34 PM
Hi,

A small update to add non cumulative chart possibility.

Enjoy :)

scottymoll
03-31-2009, 05:34 PM
Hey Gomi, I'm using the newest version of the CD indicator, but for some reason I'm getting broken data on the chart. Please see the attached image. Some bars aren't even showing. Do you know what is causing this? On my other charts I'm using your older version that doesn't record data and it works outstanding!!!

gomifromparis
03-31-2009, 05:39 PM
Hey Gomi, I'm using the newest version of the CD indicator, but for some reason I'm getting broken data on the chart. Please see the attached image. Some bars aren't even showing. Do you know what is causing this? On my other charts I'm using your older version that doesn't record data and it works outstanding!!!

This is because the version you use chooses the candle outline color (Default:Black) to paint neutral bars. You should use last version 2.3 which chooses the opposite of background color,so always shows something

scottymoll
03-31-2009, 05:48 PM
FIXED!!! You were completely right! It looks great now. I have limited amount of recorded data since I just started it this morning. Is there any chance you could post an ES file with all the tick data from last week until today, or would the file be much too large? I appreciate everything you've done for us. I think you've saved everyone quite a bit of money by creating this indicator for Ninja. Otherwise we'd all be paying for RT with a data feed.

Hopefully we can start a discussion on using this indicator as an advantage to trading. I know I have been focusing solely on this, as I see soooo much potential. Thanks!!

gomifromparis
03-31-2009, 05:53 PM
Sorry, but my last weeks replay are not complete (had to often stop ninja during development phase ). Guess you can't trade and code at the same time !

scottymoll
03-31-2009, 11:48 PM
I'm also tracking 6E (Euro FX Futures) with the CD indicator. I would assume that the Cumulative Delta would react the same as with ES or any other Futures Contract. I have noticed that there is some major divergences between price and delta on the 6E sometimes. See the attached chart for a quick example. Does this really mean that there were many more buyers (reflected on the CD), yet price still steadily declined (reflected by price). How do you think this is possible?

Edit: For some reason it says my chart file is too large to attach, but I'm sure you understand what I'm saying.

ddkk27
04-01-2009, 01:22 AM
It means aggresive buyers couldn't go through the wall of sellers, you very often can see extremly high deltas but not delta divergence at the end of the move..

gomifromparis
04-01-2009, 05:12 AM
Last cosmetical update: in OHLC mode, bars get properly resized according to main chart bar size.

scottymoll
04-01-2009, 07:48 AM
It means aggresive buyers couldn't go through the wall of sellers, you very often can see extremly high deltas but not delta divergence at the end of the move..

Yes, but doesn't this indicator show the difference of volume between buyers and sellers? If I have a uptrend of green bars on the CD indicator, it means that during each of those bars, the buyers outweighed the sellers right? It seems as though price should bid up higher, not trend lower. I think the picture attachment might work now.

Chart Pic: http://i44.tinypic.com/1589t3q.jpg

T2020
04-01-2009, 07:52 AM
Just reapplied this indicator and all the previous bars disappeared . Had it
running an hour and a half before the market opened . poof all gone .

Went back to 2.3 . Seems to be storing data again .

gomifromparis
04-01-2009, 08:02 AM
Maybe your previous version was 2.0 ? Time format changed in 2.1 to use UTC and facilitate sharing, so your times might be off ?

Always make sure "Recording OK" is showing, and when in doubt hit F5 to reinitialize the indicator.

T2020
04-01-2009, 08:20 AM
I just hit F5 and more data disappeared . It says Recording OK . Some data
remained , about 15 minutes vanished . Maybe somethings off with my PC ?
I'll just have to leave it alone through out the day I guess .

Went from 2.3 to 2.4 this morning .Now at 2.3 .

sefstrat
04-01-2009, 05:38 PM
Yes, but doesn't this indicator show the difference of volume between buyers and sellers? If I have a uptrend of green bars on the CD indicator, it means that during each of those bars, the buyers outweighed the sellers right? It seems as though price should bid up higher, not trend lower. I think the picture attachment might work now.

Chart Pic: http://i44.tinypic.com/1589t3q.jpg

Price and volume are correlated but it is not a linear relationship. Just because buying volume exceeds selling volume that does not mean the price must go up, you must also consider things like order flow and sentiment. However, look what happens to the price at the end of the trading range on the 6E chart that was posted.. what do you think caused that? =)

T2020
04-01-2009, 05:45 PM
I just hit F5 and more data disappeared . It says Recording OK . Some data
remained , about 15 minutes vanished . Maybe somethings off with my PC ?
I'll just have to leave it alone through out the day I guess .

Went from 2.3 to 2.4 this morning .Now at 2.3 .
I see now that my Firewall was responsible for the problems . I have restart
NT and make sure any changes are allowed every time I import a new indicator . Thanks again for the great indicator . I believe it's the only tick
type indicator in all of NT that doesn't lose it's data when editing the chart .
That's a 1st ! .

scottymoll
04-02-2009, 11:23 PM
Price and volume are correlated but it is not a linear relationship. Just because buying volume exceeds selling volume that does not mean the price must go up, you must also consider things like order flow and sentiment. However, look what happens to the price at the end of the trading range on the 6E chart that was posted.. what do you think caused that? =)

Thanks for the reply. I understand what you're saying... and other things need to be taken into account besides the CD indicator only (although it is AWESOME). I'm actually showing the same type of huge divergence today on the 6E again, except this time it shows price creeping higher while the sell volume enormously outweighs the buy volume. I can't wait to see how it plays out (if the CD really predicted the loading up of shorts well before the actual move).

T2020
04-03-2009, 11:00 AM
I think up ticks minus down ticks is more accurate on a short term or bar by
bar basis . Just my 2 cents worth .

gomifromparis
04-06-2009, 06:42 AM
Hi guys,

Here's a new version. I've made some design simplifications which brings
formal beauty, but I don't think you care that much about it:)
resolution of the 1 tick lag problem that some acute testers had noticed.File format stays the same, so no compatibility problem to be expected.

Enjoy!

subterfuge
04-06-2009, 11:07 AM
I downloaded the latest version, but im unsure as to what i have to do to make it so that the data isn't lost when i change the chart, like add a moving average or something.

gomifromparis
04-06-2009, 11:24 AM
I downloaded the latest version, but im unsure as to what i have to do to make it so that the data isn't lost when i change the chart, like add a moving average or something.

You can add your code in ProcessDelta, which processes the real time ticks and the historical read ticks.

gomifromparis
04-06-2009, 03:29 PM
Sorry, made a regression in 2.5, the indic couldn't create a file from scratch. This one correct the problem

LuboLabo
04-07-2009, 04:23 PM
Sorry, made a regression in 2.5, the indic couldn't create a file from scratch. This one correct the problem

Hi Gomi, thanks for the improvements, i ask u if is possible add a choise for up down ticks instead bid ask, to use it with forex data.
Thanks.

Lubo.

gomifromparis
04-07-2009, 05:37 PM
Hi Gomi, thanks for the improvements, i ask u if is possible add a choise for up down ticks instead bid ask, to use it with forex data.
Thanks.

Lubo.

What's the exact rule for calculation with up/down ticks ?

EDIT : IMHO in Forex there is no centralized exchange so no useful volume information. And if you're trading forex futures, you've got bid/ask I suppose ?

gomifromparis
04-08-2009, 05:00 AM
Here's the 3.0 indicator, compliant with GomRecorder framework (see http://www.ninjatrader-support2.com/vb/showthread.php?t=16006 )

You'll see small differences with previous versions due to changes in how bid>=ask situations are managed. In fact now they are managed.

Here's a picture of 2.5 version with new version using Flat file format and new version using Short file format.

Enjoy !

LuboLabo
04-08-2009, 05:13 AM
What's the exact rule for calculation with up/down ticks ?

EDIT : IMHO in Forex there is no centralized exchange so no useful volume information. And if you're trading forex futures, you've got bid/ask I suppose ?

I'm trading forex spot, tick volume is useful, the difference is that there's no contract volume, but ticks to build spot volume, i think for delta calculation u use difference between ask bid contract volume or number of trades(tell me if i'm wrong), in forex should be used tick up down difference for calcution of delta.

Thanks.

Lubo.

rt-trader
04-08-2009, 03:44 PM
Hi,

A simple approach to uptick/downtick might be;

if(Close[0] > lastPrice) up = true;
if(Close[0] < lastPrice) up = false;
lastPrice = Close[0];

although I have seen;

if(ask > lastAsk) up = true;
if(bid < lastBid) up = false;

lastAsk = Ask;
lastBid = Bid;

using either OnMarketDataEventArgs or OnBarUpdate GetCurrentAsk method to populate Ask and Bid.

Personally I prefer the first approach as it is a more accurrate reflection of buyer/seller momentum (the ability of either to keep prices moving in their direction regardless of counter pressure exerted as reflected by Bid/Ask transactions.

gomifromparis
04-09-2009, 05:45 AM
Here's GomCD 3.1, implementing 2 new deta calculation rules in addition to bid/ask comparison
UpDownTick => delta=sign(price-lastprice)*volume
UpDownTickWithContinuation : same as above but if price=lastprice, volume is considered to be in direction of last up or down tick

T2020
04-09-2009, 06:39 AM
Another fine improvement . Very telling when plotted one above the other .
Just wondering what "Recording short " means ?

gomifromparis
04-09-2009, 07:08 AM
Another fine improvement . Very telling when plotted one above the other .
Just wondering what "Recording short " means ?

It's the file format, there are 2 of them : flat and short. OK mena it's recording OK. It's true the message can be confusing

T2020
04-09-2009, 07:19 AM
It's the file format, there are 2 of them : flat and short. OK mena it's recording OK. It's true the message can be confusing
Is there any advantage to using Flat or Short format ?

gomifromparis
04-09-2009, 07:42 AM
Is there any advantage to using Flat or Short format ?

Flat gives larger files but easier to read if you need it. But data is the same.

T2020
04-09-2009, 08:10 AM
OK , thanks again . :)

farshadro
04-09-2009, 12:09 PM
Do you have any plans to add a volume filter to your indicator? For example plotting your indicator for block trades over 5000 shares.

gomifromparis
04-09-2009, 01:44 PM
Here is a volume filtering version. You might get very slightly different results in real-time and reading the file, because to save space, ticks that happen during same second, same price, and same "ticktype"=AtBid, AtAsk etc, are aggregated in the file.

So many small identical ticks happening the same second could create a "false" block.

Mel Funktion
04-09-2009, 02:55 PM
Hi Gomi,

thanks for your work on this great indicator. I've test-runned it for 2 days now (with version 2.5) and it worked pretty good but there is something that makes me wonder. In the last 2 days the Indicator always showed only negative (- minus) numbers in the NQ charts. Since the market traded higher today I expected some positive numbers but still only negative today.

I dont have this prob in ES / YM charts. Both markets traded higher in the last 2 days and the indicator showed mostly positive numbers (YM got back to zero and climbed up again).

Any ideas on this notice? Thank you and have a nice weekend!

gomifromparis
04-09-2009, 03:49 PM
Hi Gomi,

thanks for your work on this great indicator. I've test-runned it for 2 days now (with version 2.5) and it worked pretty good but there is something that makes me wonder. In the last 2 days the Indicator always showed only negative (- minus) numbers in the NQ charts. Since the market traded higher today I expected some positive numbers but still only negative today.

I dont have this prob in ES / YM charts. Both markets traded higher in the last 2 days and the indicator showed mostly positive numbers (YM got back to zero and climbed up again).

Any ideas on this notice? Thank you and have a nice weekend!

Sorry, I didn't look at NQ recently. CD reading is tough, but remember the absolute value has not great importance : it's the difference between two points that counts. Well as I understand it of course;)

hanaa
04-09-2009, 07:42 PM
hi indicator look interesting.but stll confused on its benefits.how to use it in my trading anybody please

fdd2k
04-11-2009, 09:10 PM
gomifromparis,

Can you make your indicator also support the minute chart with historical data, for example, adding an option for selecting between realtime and historical data?

LuboLabo
04-14-2009, 01:29 PM
Hi Gomi,
I have some problems with the last version, when i use it whit up down tick continuation and comulative chart, with the short file it woulden't work, sometime it work with flat file, but not always.....
Any help?

Thanks.

Lubo.

dosh1965
04-14-2009, 04:42 PM
Hi,

A simple approach to uptick/downtick might be;

if(Close[0] > lastPrice) up = true;
if(Close[0] < lastPrice) up = false;
lastPrice = Close[0];

although I have seen;

if(ask > lastAsk) up = true;
if(bid < lastBid) up = false;

lastAsk = Ask;
lastBid = Bid;

using either OnMarketDataEventArgs or OnBarUpdate GetCurrentAsk method to populate Ask and Bid.

Personally I prefer the first approach as it is a more accurrate reflection of buyer/seller momentum (the ability of either to keep prices moving in their direction regardless of counter pressure exerted as reflected by Bid/Ask transactions.

If you subscribe to the notion that uptick/downtick counting reflects buyer/seller momentum, would you say that momentum is better represented WITH or WITHOUT continuation (the latter means that you keep on counting the volume while price stays the same, based on the most recent tick direction, up or down)?

D.

rt-trader
04-15-2009, 04:42 PM
D,

WITH - see post #204 for way Gomi has implemented.

However, what you use is a personal decision. Work up some simple examples of Bid/Ask transactions using each method and see which approach communicates to YOU the most useful results..

dosh1965
04-15-2009, 04:45 PM
D,

WITH - see post #204 for way Gomi has implemented.

However, what you use is a personal decision. Work up some simple examples of Bid/Ask transactions using each method and see which approach communicates to YOU the most useful results..

By configuring GomCD to use all three variations (ask/bid, up/down w/o cont, up/down with cont) it looks like updown w/o cont is the clear outlier while the other two are essentially similar, tho not identical.

Thanks!

D.

farshadro
04-16-2009, 08:16 AM
Can you make an option to delete the indicator label from the charts? The label I am talking about is "GomCD(UpDownTickWithContinuation, comulativechart,1000,false) that gets printed on the top left hand corner.

marketmasher
04-16-2009, 08:41 AM
Can you make an option to delete the indicator label from the charts? The label I am talking about is "GomCD(UpDownTickWithContinuation, comulativechart,1000,false) that gets printed on the top left hand corner.


If you highlight the indicator in the list of those placed on your chart and then click the "Label" name under "General" heading, you can blank out the Label name so it doesn't show on your chart.

T2020
04-17-2009, 06:00 AM
I have been accumulating data for some time . A couple of times now I open
the charts with this indicator on it and the last hour or 2 is missing . I have
changed from "short" to " flat " file for saving data . Hoping that will cure the
problem . Any idea what's going on ? tia .

gomifromparis
04-21-2009, 10:37 AM
I have been accumulating data for some time . A couple of times now I open
the charts with this indicator on it and the last hour or 2 is missing . I have
changed from "short" to " flat " file for saving data . Hoping that will cure the
problem . Any idea what's going on ? tia .

That shouldn't happen, of course... Remember to check you have the "Recording OK" showing up. Anything appeared in the log ? Did you do a couple of "F5" to refresh the plots ?

gomifromparis
04-21-2009, 10:53 AM
Here's a cosmetical update.

On NonCumulative charts, there sometimes appeared tiny bars strangely hanging in space. This was due to the fact that on non cumulative charts, CD level is reset on the close of each bar, so if on the open of the next bar there was a big move, the next bars appeared hanging in space. Now the open of each bar is set to 0, so each bar "touches" the zero line.

There is also an option to force HiLo plotting style in the case of NonCumulative charts.

Enjoy :-)

T2020
04-21-2009, 11:06 AM
I have been accumulating data for some time . A couple of times now I open
the charts with this indicator on it and the last hour or 2 is missing . I have
changed from "short" to " flat " file for saving data . Hoping that will cure the
problem . Any idea what's going on ? tia .
Just lost my internet connection . When I got it going again an hour of data
was missing . Something isn't saving right .

gomifromparis
04-21-2009, 11:09 AM
Just lost my internet connection . When I got it going again an hour of data
was missing . Something isn't saving right .

anything in the trace file ?

T2020
04-21-2009, 11:15 AM
anything in the trace file ?
Is there more then One ? When I go to my documents , the trace file is
full of broker connection info etc .

gomifromparis
04-21-2009, 11:18 AM
Is there more then One ? When I go to my documents , the trace file is
full of broker connection info etc .

no just one. Any meesage like "ERROR: Failed to call method bla bla" ?

gomifromparis
04-21-2009, 11:21 AM
You could also check the contents of the GomCD file to see when data started missing. Remember times are UTC. Time now is 090421172000

T2020
04-21-2009, 11:30 AM
no just one. Any meesage like "ERROR: Failed to call method bla bla" ?
Didn't see any . The disconnect happened about a half hour ago . Couldn't see
any errors before or after . I can hit F5 and the data remains now . ???

T2020
04-21-2009, 11:33 AM
You could also check the contents of the GomCD file to see when data started missing. Remember times are UTC. Time now is 090421172000
Not seeing that file . ?

gomifromparis
04-21-2009, 11:51 AM
GomCD file is in my Documents, named like the instrument.
But I understand everything is OK now ?

T2020
04-21-2009, 12:23 PM
GomCD file is in my Documents, named like the instrument.
But I understand everything is OK now ?
It's not in My Documents . Did a search of my computer and all I found was
zip files of the indicator and the indicator under custom / indicator .? Folder
options set to show hidden files to .

LuboLabo
04-23-2009, 07:52 AM
Hi Gomi,
Thanks again for all the improvement, I like this indicator, it's very useful.
There still remain one issue, i don't know if I am the only one, but if I change some indicators, GomCD stop recording or sometime also stop plotting, and the only way to have it work again is change the recording file type.
The question is if there is the possibility to populate the GomCD exporting history data from NT and put it on instrument.flat.txt.
But i saw there are little differencies from recorded and exported data, one of is the time.
Is there a way to record on flat.txt the local time?

How can be done this?
What I have to change?

Thanks.

Lubo.

gomifromparis
04-23-2009, 08:58 AM
There still remain one issue, i don't know if I am the only one, but if I change some indicators, GomCD stop recording or sometime also stop plotting, and the only way to have it work again is change the recording file type.

Yes sometimes , for unknown reasons,when playing with Indicator properties, the indicator loses write rights (Recording KO appears). In that case, press F5 and everything should become OK.


The question is if there is the possibility to populate the GomCD exporting history data from NT and put it on instrument.flat.txt.
If you can wait I am working on a GomCD file converter.

LuboLabo
04-23-2009, 09:08 AM
Yes sometimes , for unknown reasons,when playing with Indicator properties, the indicator loses write rights (Recording KO appears). In that case, press F5 and everything should become OK.

If you can wait I am working on a GomCD file converter.

Thanks for reply.
Sure, I can wait for...


Lubo.

dosh1965
04-23-2009, 11:59 AM
Yes sometimes , for unknown reasons,when playing with Indicator properties, the indicator loses write rights (Recording KO appears). In that case, press F5 and everything should become OK.

If you can wait I am working on a GomCD file converter.

NT doesn't export ask/bid data, are you saying that they are actually saving it and you can write a program to export it in your format (essentially, creating a more complete export function for NT)? That would be fantastic if possible.

Also, repeating what I said elsewhere, it would be very useful to break the flat file into sessions (and have the GomCD indicator know how to navigate the collection of files created by the recorder, of course). There are two reasons for that, one, the flat file will grow to unmanageable size and will likely slow down intra-file navigation by the indicator. Two, it's much easier to fill in holes by requesting missing session files from other users of the recorder.

$.02,

D.

gomifromparis
04-23-2009, 12:39 PM
NT doesn't export ask/bid data, are you saying that they are actually saving it and you can write a program to export it in your format (essentially, creating a more complete export function for NT)? That would be fantastic if possible.

No, I don't know how to read the replay files. NT staff should, though, and be able to provide a ntm to ascii file converter:mad:... I meant creating a tool to convert NT export to GomCD format, usable then in tick mode (not bid/ask)


Also, repeating what I said elsewhere, it would be very useful to break the flat file into sessions (and have the GomCD indicator know how to navigate the collection of files created by the recorder, of course). There are two reasons for that, one, the flat file will grow to unmanageable size and will likely slow down intra-file navigation by the indicator. Two, it's much easier to fill in holes by requesting missing session files from other users of the recorder.
Sure, but for now I don't see people exchanging files or having size problems, so I'll wait for that to happen before have a major redesign :)

ctrlbrk
04-23-2009, 12:40 PM
NT doesn't export ask/bid data, are you saying that they are actually saving it and you can write a program to export it in your format (essentially, creating a more complete export function for NT)? That would be fantastic if possible.

Wow that would be nice :) Incredibly nice. But my understanding is that bid/ask is not saved anywhere by Ninja -- unless -- you turn on market replay.

Mike

dosh1965
04-23-2009, 01:05 PM
No, I don't know how to read the replay files. NT staff should, though, and be able to provide a ntm to ascii file converter:mad:... I meant creating a tool to convert NT export to GomCD format, usable then in tick mode (not bid/ask)

Sure, but for now I don't see people exchanging files or having size problems, so I'll wait for that to happen before have a major redesign :)

No, I don't know how to read the replay files. NT staff should, though, and be able to provide a ntm to ascii file converter:mad:... I meant creating a tool to convert NT export to GomCD format, usable then in tick mode (not bid/ask)

Sure, but for now I don't see people exchanging files or having size problems, so I'll wait for that to happen before have a major redesign :)

FWIW I was told my feature request was passed to the NT developers. A generic ascii converter from replay files would be ultimate.

You know, in real-life, nobody is willing to admit they have a size problem :-)

D.

gomifromparis
04-26-2009, 09:06 AM
Here's a new version capable of taking advantage data obtained by Ninja Export conversion to Gom CD with the converter application (see http://www.ninjatrader-support2.com/vb/showthread.php?t=16006) when in Bid/Ask mode.

In that case, there is no bid/ask information in the file so I added a parameter to choose what to do when you're in Bid/Ask mode, but encounter ticks in the file that have no bid/ask information. You can either do nothing (you get gaps), either create deltas using tick method or tick with continuation method.

Enjoy

MoreYummy
04-26-2009, 03:20 PM
Do you need to let it run in real time to see the value changing?

If I want to see the pass value, it seems to be 0.

Is there a page explain what it does?

gomifromparis
04-29-2009, 03:52 PM
New version capable of reading ultra concise "Binary" format.
Enjoy !

chuckt101
04-30-2009, 07:34 AM
Gomi, NT should hire you as a consultant. Then instead of saying "we don't support this" to nearly every question, they can say "hold on while I check with Gomi, the master."

LuboLabo
04-30-2009, 07:37 AM
Gomi, NT should hire you as a consultant. Then instead of saying "we don't support this" to nearly every question, they can say "hold one while I check with Gomi, the master."

Thanks Gomi!!!

Stone
04-30-2009, 07:47 AM
Gomi, NT should hire you as a consultant. Then instead of saying "we don't support this" to nearly every question, they can say "hold on while I check with Gomi, the master."

hear hear!!!

gomifromparis
04-30-2009, 08:28 AM
Thanks guys. Really appreciate it :o

toulouse-lautrec
05-15-2009, 09:58 AM
Hello Gomi,
thanks for your great work.
Unfortunately it appears there is a drawing bug using UpDownTick / NonCumulative-mode in combination.
When these modes are set, then all bars after chart initialization get drawn "flat" - pressing F5 everything looks ok again. See the two pictures, the first is after running the chart for a while in said mode, the second after pressing F5.
Can you advise please.

gomifromparis
05-15-2009, 12:27 PM
Nah, it's not a bug, it's worse :). It's by design, as Microsoft would put it...

Problem is that ticks occuring the same second, and of the same type (same price and same AtBid, AtAsk etc) are aggregated in the data file as one large tick to use less space.

I am working on an option to change this because it has strong side effects : for instance, volume filtering is not accurate when using historical data.

The side effect you observe here is that in UpDown mode, the size of the tick that creates the upmove or downmove in live is smaller than the one that creates the move on historical data, which has a good chance of being aggregated so with larger volume.

As the a result historical CD with UpDownTick mode are false and too large. Live data is correct.

Conclusion : for now do not trust UpDownTick on historical data, it is false. UpDownTickWithContinuation is OK for both live and historical.

Sorry for the inconvenience guys.

T2020
06-03-2009, 10:36 PM
I wonder if associating Ask trades with up ticks and down ticks with Bid trades
would make for a more accurate picture . Some times the bid/ask cumulative
is going down when price goes up . I know buying at the bid can be taking
place ,but personally I'd like the most accurate picture I can get . I think side
ticks should be left out of the calculation all together . I only want volume that actually moves price . I don't know enough about programing to know
exactly how your calculating this . Just my 2 cents worth . I watch both the
cumulative bid/ask and up/down ticks for the best guess I can make . thx .