Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

agon

Volume Splitter

Recommended Posts

bakrob99,

 

<= in the original code with LargeBlockFilter set to 49 is equivalent to your Example 1.

>= in the original code with LargeBlockFilter set to 50 is equivalent to your Example 2, but cleaner. E.g. what happens if some drops a trade larger than 9999? Your code would exclude that trade.

 

You should have called "IncludeSizeGT" just "minimumSize" and your "ExcludeSizeLT" just "maximumSize" which would make it much clearer what this variables actually mean. Or just leave the original code alone which works perfectly fine.

Share this post


Link to post
Share on other sites
bakrob99,

 

<= in the original code with LargeBlockFilter set to 49 is equivalent to your Example 1.

>= in the original code with LargeBlockFilter set to 50 is equivalent to your Example 2, but cleaner. E.g. what happens if some drops a trade larger than 9999? Your code would exclude that trade.

 

You should have called "IncludeSizeGT" just "minimumSize" and your "ExcludeSizeLT" just "maximumSize" which would make it much clearer what this variables actually mean. Or just leave the original code alone which works perfectly fine.

 

 

Well, make it 99999999 then or whatever value you want to represent taking all the trades into consideration. I personally have Never seen a transaction size of 9999 or larger.

 

The point is: you can change the settings to have ONLY the small lot trades, and you can change them to show ONLY the LARGE LOT trades. and you can change them to track ALL THE TRADES.

 

Have the 3 up on the chart accumulate throughout the day and then review them at the end to see if there is anything of value in them.

Share this post


Link to post
Share on other sites
I thought so too, but then I realized that it's actually might be better to be a market taker when you are a large directional trader since you have the ability to change a price. For example, let's say the best bid is 9 and best ask is 10. There are 200 contracts bid on 9 and 200 contracts offered on 10. The large trader wants to buy. The buyer has two options:

1) Place limit order on bid

2) Hit the ask with a market order

 

Let's go through both scenarios:

1) You join the bid. Now there need to be 400 contracts traded on the bid to fill your entire order. There are two problems with this:

a) You don't get your entire order filled because less than 400 contracts trade (which is bad).

b) You do get your entire order filled but the whole bid would have to be taken out unless another large trader joins after you on the bid. This means the price changes to bid 8, ask 9. Your got filled on 9 which would have been the same if you had waited for the price to change down and then hit the ask. But you took the risk of not getting executed by using that limit order.

 

2) You hit the offer and it's likely you take out the ask doing that. So the new price is now 11 bid, 11 ask. Your order was filled at 10. So you have effectively bought the bid of the new price. But your execution was guaranteed.

 

I think scenario 2 is more favorable if you are a large directiona trader since in fact you can take out an entire price with your market order. Another problem with limit order is that you might not want to show your entire size to avoid front runners, but if you don't you might not get filled. But even if you do get filled, you always want order flow to change immediately after you get filled. What I mean by that is you want your bid to get filled by sell market orders, but as soon as you get filled, you want to see buy market orders to make price go up and not put you in a losing position. If you use a market order instead, you get filled immediately. Yes, your order shows up on the time & sales. But you don't care. You're already in. If anything, it's a good thing that you order is visible on the tape because you are making other traders that watch indicators like those posted in this thread follow you, pushing price in the direction you want it to go.

 

Of course, as with everything in trading it's never not clear cut and it depends on your strategy, but I just wanted to point out that market orders do have advantages, especially if you are a big trader.

 

AgeKay, I agree with your reasoning and would like to add one more point. In general,when these large institutional players come to the market, in most cases they are not concerned with a tick. They want the orders filled quickly and effiently. These large players are not trading in the same time frame as most. The 500 contracts they just bought or sold can be a day, week or monthly position. The profit target could very well be a 20 to 50 point trade. The only time a tick may be of some importance is when the trade is a hedge and they need it filled quickly to protect the hedge price. Even in a situation like this, they cannot use a limit order and risk not getting filled. They have generally factored in a tick, two or three depending on the markets volatility and the size of the order.

 

BlowFish, I think your efforts on this indicator have been fantastic! I have used the second one you programed, simply because someone was kind enough to put it into an ELD form (I know you don't have TS). As I have said before, I have zero programing skills and can't find the time to learn. I do have a few questions about the one in ELD. If its put on a day time only chart, the info does not really show much until after 30 or 40 minutes. Do you (or anyone else) recommend leaving the length on 20 or can it be used in a shorter length? I tried it on a 24 hour but the volume difference is so great after the open that it still takes time to adjust. Any ideas? How did the volume splitter one differ from two? I know it's asking a lot but if anyone has the time to put the first one in to ELD form, it would be greatly appreciated. Thanks again Blowfish for some great work. :applaud::applaud:

Share this post


Link to post
Share on other sites
This should do what is required.

 

inputs:
Period(20),
MaxBlock(9999),
MinBlock(0),
UpColor(green),
DownColor(red);

variables:
MyVol(0),
Color(yellow),
SmoothedBA(0),
Length(squareroot(Period)),
Block(0),
intrabarpersist MyCurrentBar(0),
intrabarpersist VolumeAtBid(0),
intrabarpersist VolumeAtAsk(0),
intrabarpersist BAVolRatio(0),
intrabarpersist VolTmp(0);

if LastBarOnChart and BarStatus(1) <> 2 then begin
  	MyVol = Iff(BarType < 2, Ticks, Volume);
if CurrentBar > MyCurrentBar then begin
	VolumeAtBid = 0;
	VolumeAtAsk = 0;
	BAVolRatio = 0;
	VolTmp = 0;
	MyCurrentBar = CurrentBar;
end;
Block = Myvol - VolTmp;
if (Block >= MinBlock) and (Block <= MaxBlock) then
if InsideBid < InsideAsk then begin
	if Close <= InsideBid then
		VolumeAtBid = VolumeAtBid + Block
	else if Close >= InsideAsk then
		VolumeAtAsk = VolumeAtAsk + Block; 
	end;
if VolumeAtBid > 0 and VolumeAtAsk > 0 then	
	BAVolRatio = Log( VolumeAtAsk / VolumeAtBid );
VolTmp = MyVol ;
end ;
SmoothedBA = xaverage(xaverage(BAvolratio, Length), Length);
if SmoothedBA <= 0 then color = DownColor else color = UpColor;

plot1(SmoothedBA, "Pressure", color);
Plot2( 0, "ZeroLine" ) ;

 

Thank you BlowFish. This is your first copy of the volume splitter. It is on the top of page 10. Again because I don't know the language, what is the difference between this and vol spillter two? On the bottom of page 12 is that an improvement to Vol Splitter one? Thanks again for all your work. This may be the best indicator I have found to date.

Share this post


Link to post
Share on other sites

 

The original had a <=

 

I'm not sure what this does, but it makes it so that the indicator looks the same whether you keep the default value of 100 for "LargeBlockFilter" in Inputs, or whether you change it from 100 to 10. Maybe this change just disables the LargeBlockFilter?

 

 

Tasuki when I first introduced the 'fix' I mentioned as coded it was actually a small block filter. You should read a bit more carefully :) volume less than clock filter makes it small block filter. volume > than block filter makes it a large block filter.

 

Anyway thanks for the charts.

Share this post


Link to post
Share on other sites

To avoid confusion here is the code with a max block size and min block size rather than a filter. Much as bakrob said (I edited it just before I got to his post!!) It should work but I didn't compile it as the indicator is running live on my charts right now.

 


inputs: 
UpColor(darkgreen), 
DownColor(red), 
DeltaBar(1), 
MaxBlock(9999),
MinBlock(0),
ResetDeltaEachBar(0); 

variables: 
MyVol(0), 
color(yellow), 
intrabarpersist MyCurrentBar(0), 
intrabarpersist VolumeAtBid(0), 
intrabarpersist VolumeAtAsk(0), 
intrabarpersist BAVolRatio(0), 
intrabarpersist VolTmp(0), 
intrabarpersist Delta (0), 
intrabarpersist DeltaH (0), 
intrabarpersist DeltaL (0), 
intrabarpersist DeltaO (0); 

if LastBarOnChart then begin 
  	MyVol = Iff(BarType < 2, Ticks, Volume); 
if CurrentBar > MyCurrentBar then begin 
	VolumeAtBid = 0; 
	VolumeAtAsk = 0; 
	BAVolRatio = 0; 
	VolTmp = 0; 
	MyCurrentBar = CurrentBar; 
	if ResetDeltaEachbar = 1 then Delta =0;
	DeltaO = Delta; 
	DeltaH = Delta; 
	DeltaL = Delta; 
end; 
if (Block >= MinBlock) and (Block <= MaxBlock) then
	if Close <= InsideBid then
		Delta  = Delta - MyVol + VolTmp
	else if Close >= InsideAsk then 
		Delta = Delta + MyVol - VolTmp ;  
	VolTmp = MyVol ;
end; 
end ; 


DeltaH = maxlist(DeltaH, Delta); 
DeltaL = minlist(DeltaL, Delta); 


if Delta <= 0 then color = DownColor else color = UpColor; 

plot1(DeltaO, "DO"); 
Plot2(DeltaH, "DH"); 
Plot3(DeltaL, "DL"); 
plot4(Delta, "DC");	 

Share this post


Link to post
Share on other sites
Tasuki, AgeKey

 

 

 

Add as the very first input the following:

Desc("AddText"),

 

Then when you are setting the inputs say for Small Lot Sizes:

Change the Desc input to "Small Lots",

 

This will now display the text "Small Lots" on your subgraph indicator description line so you can easily know what you are tracking.

 

Great Idea too!!!

 

 

...

Share this post


Link to post
Share on other sites
Thank you BlowFish. This is your first copy of the volume splitter. It is on the top of page 10. Again because I don't know the language, what is the difference between this and vol spillter two? On the bottom of page 12 is that an improvement to Vol Splitter one? Thanks again for all your work. This may be the best indicator I have found to date.

 

Hi essentially the first is an oscillator. The second shows cumulative 'order flow' for the day.

 

Normally I would add comments at the top of the indicator. In my defence it started as a quick and dirty to prove the concept :) I will tidy them up and then post them both in the indicator section.

Share this post


Link to post
Share on other sites

the orderflow on a 1 minute fdax chart no filters being used

unbelievable to see how the "average" is shorting all the way a 50 point upmove

 

btw BlowFish your last skript which you didnt compile yet you havent declared the variable Block yet

 

thank you this is a very usefull indicator

 

80807568.th.png

Share this post


Link to post
Share on other sites

Blowfish,

The code in permalink #156 won't verify. When it gets to the word "Block" it says "word not recognized by Easylanguage." I tried adding 'Block (0),' to the Inputs, but that created another error further down. Not sure how to fix.

Thanks, Tasuki

p.s. oops, looks like the dutchman beat me to the punch! Oh well, I'll leave mine in.

Share this post


Link to post
Share on other sites
Tasuki when I first introduced the 'fix' I mentioned as coded it was actually a small block filter. You should read a bit more carefully :) volume less than clock filter makes it small block filter. volume > than block filter makes it a large block filter.

 

Anyway thanks for the charts.

 

Sorry for being so dense, Blowfish. I guess everyone but me understands what you're saying, but my problem is that there are two ways of thinking about the word "filter". Does the 'largeblockfilter' filter OUT large blocks, so all you see is small blocks, or does it filter out small blocks so that all you're seeing is the large blocks? It's a tricky semantic difference but crucial.

 

Thanks, and sorry for belaboring the point---I just want to make sure I've got it straight.

Share this post


Link to post
Share on other sites

Woops way to completely balls up :crap: I only changed a couple of lines and managed to get an additional end statement and undefined variable (block) as you guys pointed out. It's got to the stage where it needs a tidy up (as well as comments) but this should at least run

 


inputs: 
UpColor(darkgreen), 
DownColor(red), 
DeltaBar(1), 
MaxBlock(9999),
MinBlock(0),
ResetDeltaEachBar(0); 

variables: 
MyVol(0), 
Block(0),
color(yellow), 
intrabarpersist MyCurrentBar(0), 
intrabarpersist VolumeAtBid(0), 
intrabarpersist VolumeAtAsk(0), 
intrabarpersist BAVolRatio(0), 
intrabarpersist VolTmp(0), 
intrabarpersist Delta (0), 
intrabarpersist DeltaH (0), 
intrabarpersist DeltaL (0), 
intrabarpersist DeltaO (0); 

if LastBarOnChart then begin 
  	MyVol = Iff(BarType < 2, Ticks, Volume); 
if CurrentBar > MyCurrentBar then begin 
	VolumeAtBid = 0; 
	VolumeAtAsk = 0; 
	BAVolRatio = 0; 
	VolTmp = 0; 
	MyCurrentBar = CurrentBar; 
	if ResetDeltaEachbar = 1 then Delta =0;
	DeltaO = Delta; 
	DeltaH = Delta; 
	DeltaL = Delta; 
end; 
Block = Myvol - VolTmp;
if (Block >= MinBlock) and (Block <= MaxBlock) then
	if Close <= InsideBid then
		Delta  = Delta - MyVol + VolTmp
	else if Close >= InsideAsk then 
		Delta = Delta + MyVol - VolTmp ;  
	VolTmp = MyVol ;
end; 


DeltaH = maxlist(DeltaH, Delta); 
DeltaL = minlist(DeltaL, Delta); 


if Delta <= 0 then color = DownColor else color = UpColor; 

plot1(DeltaO, "DO"); 
Plot2(DeltaH, "DH"); 
Plot3(DeltaL, "DL"); 
plot4(Delta, "DC");	 

Share this post


Link to post
Share on other sites
Sorry for being so dense, Blowfish. I guess everyone but me understands what you're saying, but my problem is that there are two ways of thinking about the word "filter". Does the 'largeblockfilter' filter OUT large blocks, so all you see is small blocks, or does it filter out small blocks so that all you're seeing is the large blocks? It's a tricky semantic difference but crucial.

 

Thanks, and sorry for belaboring the point---I just want to make sure I've got it straight.

 

Your quite right....which is why it's probably better all round to think of a max order size and min order size and have both as a parameter.

Share this post


Link to post
Share on other sites
Be careful, "Delta" is a function in EL.

 

Actually, I think the function is "@Delta", at least according to TS help.

 

"Delta" is a reserved word in Optionstation, but I don't think it's a problem with EL code for indicators.

 

At least, it doesn't seem to be a problem--the indicator works just fine.

 

Trouble is, I still can't figure out how to use it in trading, but maybe I'll get the hang of it after I've looked at enough charts.

 

Hey, has anybody compared Blowfish's latest with the one from EOTProLive that started this whole thread? Are they the same, similar, totally different?

Share this post


Link to post
Share on other sites

@ is a skip character in EasyLanguage.

 

It is ignored during compilation.

 

 

Samuel Tennis put an @ in front of all the function names for easy identification.

 

The story goes that the Cruz brothers removed them without first discussing with Samuel.

Share this post


Link to post
Share on other sites

Questions on Inputs for Blowfish's latest and greatest:

 

1) when would you change the DeltaBar value from 1 to something else?

2) when would you change the ResetDeltaEachBar from 0 to something else?

 

Thanks, Tasuki

5aa70ed72845e_InputsVolSplitter4.png.35b8033a7de497d68530ca74c71c66d0.png

Share this post


Link to post
Share on other sites

ResetDeltaEachBar does just that .....It starts from zero each bar giving a histogram. You would increase the minimum block size if you wanted to look at large block trades so for ES you might have min 50 max 9999 for large traders. Or maybe min 25 max 49 for medium size.

 

I doubt it looks that much like the indicator in the original post as that is not what I based this on. I do believe they are based from the same core principles though.

Share this post


Link to post
Share on other sites

Blowfish et al,

See attached charts. They come from today's session, friday, May 22, in the morning.

I see a potential problem, or at least something I don't understand that might be important.

 

On both charts, the vertical dotted line represents the open (6:30 AM here in California). The blue indicator shows the big traders, 100-9999 contracts, and the yellow indicator shows the little traders, 1-5 contracts. The first chart is a volume chart, 7777 volume, and the second is a simple 5 minute chart. (the horizontal lines over price represent the Globex high and low--just ignore for this discussion).

 

Notice how different the blue indicator looks on the two different charts. Starting at the open, the volume chart shows a steady decline, whereas the 5 minute chart shows a steady rise. How can this be? Either the big traders are buying or they're not---how could their activities be represented differently, in fact oppositely, for the two charts? I forgot to add the 610 tick chart, but it shows the same pattern of decline that the 7777 volume chart does.

 

I'm guessing that this is some artifact of the way I've set up the charts, or the scaling or something, but it would sure be helpful to know what's going on here in order to make better use of this wonderful indicator.

 

Thanks, Tasuki

5aa70ed86dbf7_7777volume.thumb.png.8455769acbfe65fd2bdce044842fb166.png

5aa70ed87687b_5min.thumb.png.4d9a1e578b2af1860be30cbe2ff94a09.png

Edited by Tasuki

Share this post


Link to post
Share on other sites
Hello guys,

here is a solution for TradeStation with caching a data base. Closed and open code.

BidAskDelta

So it's possible to save all traded volume at bid and ask. Data base is realized with

EL Collections DLL.

 

-swisstrader

 

swisstrader,

Sounds interesting. How is this indicator or yours different/better than the one that's publicly disclosed on Traders Lab?

Thanks, Tasuki

Share this post


Link to post
Share on other sites

Hello All,

 

I am not a programmer, just a trader, so here are afew observations. Tasuki asks on May 19th, are the volume splitters developed here the similar or different than the one used by EOT? To me they look different. I was in their room on May 21st and their VS was very accurate as far as perdicting divigerences. I do not see that on the Volume Splitter 2 ELD posted in this thread. i am running the VS2 right next to the PZT BidAsk Pressure indicator and they look identical. I am also noticing something else unusual. I am running the PZT Bid ask Pressure on 2 different charts. One chart is the ESM09.D and the ESM09. Both charts are 2584 volume charts. The BidAsk Pressure indicator does not plot the same. I think the indicator is easier to read on the ESM09 verses the day chart only. I discovered this by accident. I am pulling for you programmers to figure this out!

 

Olive

Share this post


Link to post
Share on other sites
Hello All,

 

I am not a programmer, just a trader, so here are afew observations. Tasuki asks on May 19th, are the volume splitters developed here the similar or different than the one used by EOT? To me they look different. I was in their room on May 21st and their VS was very accurate as far as perdicting divigerences. I do not see that on the Volume Splitter 2 ELD posted in this thread. i am running the VS2 right next to the PZT BidAsk Pressure indicator and they look identical. I am also noticing something else unusual. I am running the PZT Bid ask Pressure on 2 different charts. One chart is the ESM09.D and the ESM09. Both charts are 2584 volume charts. The BidAsk Pressure indicator does not plot the same. I think the indicator is easier to read on the ESM09 verses the day chart only. I discovered this by accident. I am pulling for you programmers to figure this out!

 

Olive

 

Olive,

See attached charts. OK, so I'm not exactly comparing apples to apples here because my bid ask pressure is on a day only chart (just the way I pulled it up this morning) and my vol splitter is on a 24 hour session, but even so, I don't see any similarity in the patterns of the indicators at all. For clarity, the blue line in the vol spllitter is the large traders (100-9999 contracts) and the yellow line is the small traders (1-5 contracts).

My experience is that indicators on the the day-only and 24 hour ES do look different in the morning, but tend to merge by the afternoon (I'm showing 233 tick charts from near the end of the day).

Anyway, what I'd really like to do is to compare both of these indicators with the one from EOTProLive, but I haven't signed up with them yet. I've been watching the vol splitter today on several time/tick/volume frames, and I wouldn't have made money with it if I'd been trading live. Maybe I'm not seeing it right.

Tasuki

5aa70ed883872_bidaskpressure233tick.thumb.png.7e158dbcecd660ae9a2a19cd4127d1f4.png

5aa70ed88c4f5_volsplitter233tick.thumb.png.90326bb20532262abdfd8592a4bfb549.png

Share this post


Link to post
Share on other sites

Tasuki,

 

EOT used to allow anyone into their room as a guest on the last Friday of the month. Check out their website EOTPRO. to see if this is still true. They also have a free trial you can try, if you have never been in their trading room.

 

When I was comparing indicators, it was in the afternoon that they were different. Thats why I thought it was unusual. Try it out Tuesday, after the holiday.

 

They do have some nice indicators. I wish they would sell their indicators rather than lease. The one that identifies Trend or Chop would be nice to see someone program in Trades Laboratory. In my mind, it would be very easy since it appears to be based on price alone.

 

Would you mind telling me where you obtained the BidAskPressure02A?

 

Thanks

 

Olive

Share this post


Link to post
Share on other sites
swisstrader,

Sounds interesting. How is this indicator or yours different/better than the one that's publicly disclosed on Traders Lab?

Thanks, Tasuki

 

Tasuki,

I have realized a data base for Tradestation, because after a reset is all deleted.

With my indicator you recall the data base and the indicator works again.

This data base is neccesary because 'InsideBid' and 'InsideAsk' isn't cached in TS data feed.

 

-swisstrader

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.