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

Results from testing the four indicators created on this thread:

1) phall permalink #73 p. 8

2) swansjr permalink #87 p. 9

3) Blowfish #1 permalink #91 p. 10

4) Blowfish #2 permalink #120 p. 12

 

So, what do these results tell us?

 

When I took the Blowfish #2 code and made all the lines into histograms, it looked really different. Even the values were different. Not sure what that's about.

 

Divergences on Blowfish #1 look very nice, actually.

 

Code for phall maybe TOO smoothe?

 

Code for swansjr maybe TOO choppy?

 

BTW, I haven't made any changes to the code as posted. I wouldn't know what to change anyway, since I don't understand what these indicators are actually looking at.

5aa70ed374e16_ES1mBlowfishcode1and2.thumb.png.2b1df02dc2e0a518c21894fa76a07976.png

5aa70ed37d4b9_ES1mphallandswansjr.thumb.png.703cd8c47df4459cca75fbc5d8f22d14.png

5aa70ed3857ce_ES377tickBlowfishcode1and2code2ashistogram.thumb.png.78be1f83ff7f689ec61771ef0aba0925.png

5aa70ed395652_ES377tickBlowfishcode1and2.thumb.png.8d1317d64a3a95b3be74497b15fa99cb.png

5aa70ed3a09a9_ES377tickphallandswansjr.thumb.png.e8e6daf020cfe74c1fc7ca394a0934d0.png

5aa70ed3a902a_ES4181volumeBlowfishcode1and2.thumb.png.da1b9b2d688fcba504e3537cb3265779.png

5aa70ed3b1025_ES4181volumephallandswansjr.thumb.png.be7402340b44ebc7e41d024b8667d2e1.png

Share this post


Link to post
Share on other sites

Try plotting the second set of code I posted as OHLC bars Tasuki. I wouldn't bother with a block filter on that at all. Ideally plot it from session open....it attempts to show the absolute 'order flow' for the day. As I mentioned before I think the >= sign that compares with the block size is probably the wrong way round. If you are including all order flow that shouldn't matter.

Share this post


Link to post
Share on other sites

Hi

got a little more time to work on this. my last post was a paste of the two pieces i'd seen in previous posts. after running it for a while, i wasn't happy with the way the TRIX was over smoothing it.

 

i found that plotting the running line of the net shares caused the referencing to be all screwy. So i change it to summing everything over a fixed window and plot a smoothed version of it. Then i calculated the momentum of that and plot that also. Note: you need to let the indicator run for at least 1/2 of the total set Cumulative length before it means anything.

 

Setting the minlot to 99 and letting it run on a 3 min chart seemed to get close; i can see when the big boys start accumulating/distributing. the momentum line helps alot also to give you some warning that a change is coming.

 

As with all these averaged indicators, alot of work needs to be done picking the averaging lengths for the time frame to get what you want. Any feedback on testing different settings would be great.

 

Anyway, here's the code; if you could test it a bit and let me know what you find out that'd be great.

 

ALSO, PLEASE VOTE AT TRADESTATION FOR THE T&S data in Easylanguage. THANKS

 

phall

 

Code: Sorry about the formatting:

 

 

{phall 5/12, Volume Splitter}

 

Inputs: MinLotSize(99),

MaxLotSize(999),

CumulativeLength(50),

CumulativeAvgLength(20),

MomLength(2),

MomSmoothLength(3);

 

 

Var: intrabarpersist LTicks(0);

Var: intrabarpersist TSize(0);

Var: intrabarpersist UpSum(0);

Var: intrabarpersist DnSum(0);

Var: intrabarpersist CumSum(0);

 

Vars:

Deltacum(0),

CumOverLength(0),

Moment(0);

 

if LastBarOnChart then

Begin

 

TSize = Ticks - LTicks;

LTicks = Ticks;

If TSize >= MinLotSize and TSize <= MaxLotSize then

Begin

if Close = CurrentBid then DnSum = DnSum + TSize;

if Close = CurrentAsk then UpSum = UpSum + TSize;

End;

 

if BarStatus(1) = 2 then {Bar Close}

begin

CumSum = CumSum[1] + UpSum - DnSum ;

LTicks = 0; UpSum = 0; DnSum = 0;

End;

End;

 

{difference in contracts from last bar}

DeltaCum=Cumsum-Cumsum[1];

 

{calculated over fixed window, this is running total of net contracts in window length }

CumOverLength=Xaverage(Summation(Deltacum,CumulativeLength),CumulativeAvgLength);

 

{smoothed momentum line of the net contracts}

Moment=xaverage((Cumoverlength-CumoverLength[momlength]),momsmoothlength);

 

{Plots both the Total, Momentum of total, and Net change per bar}

Plot1(CumOverLength, "Cumulative"); {this is the main indicator showing running total}

 

Plot2(Moment*5,"Mom"); {this is the momentum line of main indicator; may need to adjust the "5" scaling factor}

 

Plot3(DeltaCum,"Cum. Net Chg"); {this is good to plot as histo so you can see net change every bar}

Share this post


Link to post
Share on other sites

hi

the ehlers instantaneous trendline in place of the EMA will speed it up alot

also, after looking at some data, the CumulativeLength might be better set to 20, Cumavglength to 10

 

phall

Edited by phall

Share this post


Link to post
Share on other sites
Try plotting the second set of code I posted as OHLC bars Tasuki. I wouldn't bother with a block filter on that at all. Ideally plot it from session open....it attempts to show the absolute 'order flow' for the day. As I mentioned before I think the >= sign that compares with the block size is probably the wrong way round. If you are including all order flow that shouldn't matter.

 

Blowfish,

 

1) So, do I just set the blockfilter to 0 in the inputs of the indicator?

 

2) Is this the line in your code that you're referring to regarding the sign being the wrong way around?:

 

if absvalue(MyVol-VolTmp) <= LargeBlockFilter then begin

 

This is the way it appears in my code, but it's got the less than or equals,

not the greater than or equals. Maybe I'm looking at the wrong spot in the

code? Please explain, and thanks!

 

Tasuki

Share this post


Link to post
Share on other sites

The new Blowfish indicator rocks! check out this divergence today on the es 1min!

 

dumb money is the bottom thinking we were going to go higher into hourly resistance and smart money is the top selling hard after dumb money bought a 1 min pull back.

 

granted I started plotting it half way through the day it still worked fine.

 

 

pretty sexy stuff. keep up the good work!

Share this post


Link to post
Share on other sites

Check out the divergence today on the 1 min es! big money is top dumb money is bottom!

 

Smartmoney was selling into 1 hour resistance while dumb money was buying a 1min pull back! check out the sell off after they bought blowing through dumb money's stops!

 

pretty sexy stuff! keep up the good work!

5aa70ed446299_VolSplitter.jpg.2704b7cfaf3ab3f19460009368ba5de9.jpg

Edited by slytrader
new to posting :-D

Share this post


Link to post
Share on other sites

Glad you like it. I have to say it's a while since I have had it on a chart but was rather surprised by how revealing it was when I ran it yesterday. I do have an issue with it intellectually and that is the assumption that informed traders ('smart money') will buy or sell aggressively (hit the bid or ask). That's just not the case for certain types of traders or under certain market conditions. Having said that it does seem to be a decent guage of order flow.

Share this post


Link to post
Share on other sites
I do have an issue with it intellectually and that is the assumption that informed traders ('smart money') will buy or sell aggressively (hit the bid or ask).

 

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.

Share this post


Link to post
Share on other sites

AgeKay and Blowfish – thanks. For the reasons you both gave (and a couple other reasons too) I decided to go /stay with an ‘unfiltered’ flow indicator and learn when (and when not) to use it and when to go with it and when to fade it... I found that with all of these versions of ‘money flow’ indicators, learning when to use them is more important than how.

Share this post


Link to post
Share on other sites

Most surely there are times that it will be true others not. Different participants have widely different agendas and modus operandi. Hell, some participants are not even profit motivated (not as you or I would think of 'profit'). I would recommend any one who is interested to check out a decent book on Market Microstructure Harris writes 650 odd pages on the subject it is quite a deep and involved subject and hard to do justice to in a couple of forum posts. :) Really we would need to go through each type of participant and look at how they operate.

 

Back to the indicator (the 2nd one which is going to need a name I guess....how about net order flow? cumulative net order flow is a bit of a mouthful) again, today, it has given some pretty good insight to the days goings on. I am tempted to incorporate it into my trading. Trouble is to do any testing is going to take an eternity as it only runs live. I'd also like to look at longer accumulations (like a week) of data too. Again a pain really with the real time restriction. It's about time charting applications save order book information and generated update ticks on all data streams.

Share this post


Link to post
Share on other sites
AgeKay and Blowfish – thanks. For the reasons you both gave (and a couple other reasons too) I decided to go /stay with an ‘unfiltered’ flow indicator and learn when (and when not) to use it and when to go with it and when to fade it... I found that with all of these versions of ‘money flow’ indicators, learning when to use them is more important than how.

 

Good for you :)

....

Share this post


Link to post
Share on other sites

Blowfish,

 

Your indicator seems interesting, and I would like to test it for a while. Is there anyone here that can code it for ninja trader? I would attempt to myself, but I know very little about programming.

Thanks

Share this post


Link to post
Share on other sites

Two charts attached.

Both are ES 233 tick. Both have two indicators, the Blowfish indicator #2 and also the modification suggested by bakrob99 which I'm calling Blow3. He suggested the following:

 

if absvalue(MyVol-VolTmp) >= LargeBlockFilter then begin

 

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?

 

That doesn't really help me use the indicator, however. In fact, I have no idea what it's actually doing. Can someone explain in plain English what this indicator does?

Secondarily, how would you use it to trade?

 

You'll notice that the lower indicator, the Blow2 (Blowfish's original code from p.12, permalink #120) does come out differently when you change the LargeBlockFilter from 100 to 10. What does this LargeBlockFilter actually filter? Is it filtering OUT the large blocks of trades, or filtering them IN? If you have it set to 100, does the indicator now INCLUDE or EXCLUDE large blocks?

Again, how does this help you understand the market, and more importantly, how can you use this to help you trade?

5aa70ed51c345_ES233TBlow2Blow3LBF10.thumb.png.ae17000d6dcbb295b0d1b5c4cd745e8f.png

5aa70ed526326_ES233TBlow2Blow3LBF100.thumb.png.c2f45deb67c0051a0c0dc5c35966231c.png

Share this post


Link to post
Share on other sites

<= means to count the delta of trades smaller than LargeBlockFilter (i.e. "small trades")

>= means to count the delta of trades larger than LargeBlockFilter (i.e. "big trades")

 

Tasuki, you should definitely try to understand what this indicator means. Otherwise, it's just one more "magic" indicator that will never make you money.

Share this post


Link to post
Share on other sites

Never ceases to amaze me that I get more good stuff from TL than anywhere else. :) I went to their website and watched their "Alahas" indicator. Did anyone notice that this and their SD's look very similar to trading with market stats that JPERL did with VWAP and SD's?

Share this post


Link to post
Share on other sites

AgeKay, you managed to quote me on something I didn't say, and I don't think that's correct. The way Blowfish's code is written it would appear that if you use the greater than sign....in this code here:

 

if absvalue(MyVol-VolTmp) >= LargeBlockFilter then begin

 

then it appears that you must turn OFF the LargeBlockFilter, because the indicator looks identical when you use a block filter of 10 or 100.

 

However, if you use the less than sign, like this:

 

if absvalue(MyVol-VolTmp) <= LargeBlockFilter then begin

 

then you find that the indicator looks different when you use a block filter of 10 vs. 100.

I'm assuming that this means that the block filter is ON when your code has the "less than or equal" sign in it.

 

Have I got this right?

Share this post


Link to post
Share on other sites

Sorry, Tasuki, I didn't mean to put it in quotes. The text in the code was supposed to be my reply to your question what the <= and >= signs in BlowFish's code mean.

 

So:

 

<= means to count the delta of trades smaller than LargeBlockFilter (i.e. "small trades")

>= means to count the delta of trades larger than LargeBlockFilter (i.e. "big trades")

 

And the text below the quote was just my general comment also directed to you.

Share this post


Link to post
Share on other sites

Tasuki, AgeKey

 

Yesterday I looked a little more closely into the code and decided to change the blocksizefilter to have an "include" filter and an "Exclude" filter.

 

Example1: So now you can have the code run on JUST small size blocks by setting the include filter to 0 and the exclude filter to say 49 on the ES. This would have the effect of tracking trades with sizes between 1 and 49 only. No big size lots. Just the small ones.

 

Example2: You can also set it to Include size say 50 (for 50 and above trades) and Exclude Size 9999 to keep all the large ones. This would have the effect of tracking trades for only the large lot sizes.

 

It's simple to make these changes:

 

Replace:

LargeBlockFilter(0),

with:

IncludeSizeGT(0),

ExcludeSizeLT(9999),

 

This Line:

if absvalue(MyVol-VolTmp) >= LargeBlockFilter then begin

Becomes:

if absvalue(MyVol-VolTmp) >= IncludeSizeGT

and absvalue(MyVol-VolTmp) <= ExcludeSizeLT then begin

 

Hope this clarifies things a bit.l

 

Oh ... one other thing I did which Might help keep track of multiple settings for this indicator:

 

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.

Edited by bakrob99

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.


  • Topics

  • Posts

    • Date: 7th April 2025.   Asian Markets Plunge as US-China Trade War Escalates; Wall Street Futures Signal Further Turmoil.   Global financial markets extended last week’s massive sell-off as tensions between the US and its major trading partners deepened, rattling investors and prompting sharp declines across equities, commodities, and currencies. The fallout from President Trump’s sweeping new tariff measures continued to spread, raising fears of a full-blown trade war and economic recession.   Asian stock markets plunged on Monday, extending a global market rout fueled by rising tensions between the US and China. The latest wave of aggressive tariffs and retaliatory measures has unnerved investors worldwide, triggering sharp sell-offs across the Asia-Pacific region.   Asian equities led the global rout on Monday, with dramatic losses seen across the region. Japan’s Nikkei 225 index tumbled more than 8% shortly after the open, while the broader Topix fell over 6.5%, recovering only slightly from steeper losses. In mainland China, the Shanghai Composite sank 6.7%, and the blue-chip CSI300 dropped 7.5% as markets reopened following a public holiday. Hong Kong’s Hang Seng Index opened more than 9% lower, reflecting deep concerns about escalating trade tensions.           South Korea’s Kospi dropped 4.8%, triggering a circuit breaker designed to curb panic selling. Taiwan’s Taiex index collapsed by nearly 10%, with major tech exporters like TSMC and Foxconn hitting circuit breaker limits after each fell close to 10%. Meanwhile, Australia’s ASX 200 shed as much as 6.3%, and New Zealand’s NZX 50 lost over 3.5%.   Despite the escalation, Beijing has adopted a measured tone. Chinese officials urged investors not to panic and assured markets that the country has the tools to mitigate economic shocks. At the same time, they left the door open for renewed trade talks, though no specific timeline has been set.   US Stock Futures Plunge Ahead of Monday Open   US stock futures pointed to another brutal day on Wall Street. Futures tied to the S&P 500 dropped over 3%, Nasdaq futures sank 4%, and Dow Jones futures lost 2.5%—equivalent to nearly 1,000 points. The Nasdaq Composite officially entered a bear market on Friday, down more than 20% from its recent highs, while the S&P 500 is nearing bear territory. The Dow closed last week in correction. Oil prices followed suit, with WTI crude dropping over 4% to $59.49 per barrel—its lowest since April 2021.   Wall Street closed last week in disarray, erasing more than $5 trillion in value amid fears of an all-out trade war. The Nasdaq Composite officially entered a bear market on Friday, sinking more than 20% from its recent peak. The S&P 500 is approaching bear territory, and the Dow Jones Industrial Average has slipped firmly into correction territory.   German Banks Hit Hard Amid Escalating Trade Tensions   German banking stocks were among the worst hit in Europe. Shares of Commerzbank and Deutsche Bank plunged between 9.5% and 10.3% during early Frankfurt trading, compounding Friday’s steep losses. Fears over a global trade war and looming recession are severely impacting the financial sector, particularly export-driven economies like Germany.   Eurozone Growth at Risk   Eurozone officials are bracing for economic fallout, with Greek central bank governor Yannis Stournaras warning that Trump’s tariff policy could reduce eurozone GDP by up to 1%. The EU is preparing retaliatory tariffs on $28 billion worth of American goods—ranging from steel and aluminium to consumer products like dental floss and luxury jewellery.   Starting Wednesday, the US is expected to impose 25% tariffs on key EU exports, with Brussels ready to respond with its own 20% levies on nearly all remaining American imports.   UK Faces £22 Billion Economic Blow   In the UK, fresh research from KPMG revealed that the British economy could shrink by £21.6 billion by 2027 due to US-imposed tariffs. The analysis points to a 0.8% dip in economic output over the next two years, undermining Chancellor Rachel Reeves’ growth agenda. The report also warned of additional fiscal pressure that may lead to future tax increases and public spending cuts.   Wall Street Braces for Recession   Goldman Sachs revised its US recession probability to 45% within the next year, citing tighter financial conditions and rising policy uncertainty. This marks a sharp jump from the 35% risk estimated just last month—and more than double January’s 20% projection. J.P. Morgan issued a bleaker outlook, now forecasting a 60% chance of recession both in the US and globally.   Global Leaders Respond as Trade Tensions Deepen   The dramatic market sell-off was triggered by China’s sweeping retaliation to a new round of US tariffs, which included a 34% levy on all American imports. Beijing’s state-run People’s Daily released a defiant statement, asserting that China has the tools and resilience to withstand economic pressure from Washington. ‘We’ve built up experience after years of trade conflict and are prepared with a full arsenal of countermeasures,’ it stated.   Around the world, policymakers are responding to the growing threat of a trade-led economic slowdown. Japanese Prime Minister Shigeru Ishiba announced plans to appeal directly to Washington and push for tariff relief, following the US administration’s decision to impose a blanket 24% tariff on Japanese imports. He aims to visit the US soon to present Japan’s case as a fair trade partner.   In Taiwan, President Lai Ching-te said his administration would work closely with Washington to remove trade barriers and increase purchases of American goods in an effort to reduce the bilateral trade deficit. The island's defence ministry has also submitted a new list of US military procurements to highlight its strategic partnership.   Economists and strategists are warning of deeper economic consequences. Ronald Temple, chief market strategist at Lazard, said the scale and speed of these tariffs could result in far more severe damage than previously anticipated. ‘This isn’t just a bilateral conflict anymore — more countries are likely to respond in the coming weeks,’ he noted.   Analysts at Barclays cautioned that smaller Asian economies, such as Singapore and South Korea, may face challenges in negotiating with Washington and are already adjusting their economic growth forecasts downward in response to the unfolding trade crisis.           Oil Prices Sink on Demand Concerns   Crude oil continued its sharp slide on Monday, driven by recession fears and weakened global demand. Brent fell 3.9% to $63.04 a barrel, while WTI plunged over 4% to $59.49—both benchmarks marking weekly losses exceeding 10%. Analysts say inflationary pressures and slowing economic activity may drag demand down, even though energy imports were excluded from the latest round of tariffs.   Vandana Hari of Vanda Insights noted, ‘The market is struggling to find a bottom. Until there’s a clear signal from Trump that calms recession fears, crude prices will remain under pressure.’   OPEC+ Adds Further Pressure with Output Hike   Bearish sentiment intensified after OPEC+ announced it would boost production by 411,000 barrels per day in May, far surpassing the expected 135,000 bpd. The alliance called on overproducing nations to submit compensation plans by April 15. Analysts fear this surprise move could undo years of supply discipline and weigh further on already fragile oil markets.   Global political risks also flared over the weekend. Iran rejected US proposals for direct nuclear negotiations and warned of potential military action. Meanwhile, Russia claimed fresh territorial gains in Ukraine’s Sumy region and ramped up attacks on surrounding areas—further darkening the outlook for markets.   Always trade with strict risk management. Your capital is the single most important aspect of your trading business.   Please note that times displayed based on local time zone and are from time of writing this report.   Click HERE to access the full HFM Economic calendar.   Want to learn to trade and analyse the markets? Join our webinars and get analysis and trading ideas combined with better understanding of how markets work. Click HERE to register for FREE!   Click HERE to READ more Market news.   Andria Pichidi HFMarkets   Disclaimer: This material is provided as a general marketing communication for information purposes only and does not constitute an independent investment research. Nothing in this communication contains, or should be considered as containing, an investment advice or an investment recommendation or a solicitation for the purpose of buying or selling of any financial instrument. All information provided is gathered from reputable sources and any information containing an indication of past performance is not a guarantee or reliable indicator of future performance. Users acknowledge that any investment in Leveraged Products is characterized by a certain degree of uncertainty and that any investment of this nature involves a high level of risk for which the users are solely responsible and liable. We assume no liability for any loss arising from any investment made based on the information provided in this communication. This communication must not be reproduced or further distributed without our prior written permission.
    • AMZN Amazon stock watch, good buying (+313%) toi hold onto the 173.32 support area at https://stockconsultant.com/?AMZN
    • META stock watch, local support and resistance areas at 507.48, 557.84 at https://stockconsultant.com/?META
    • TMUS T-Mobile stock, watch for a top of range breakout at https://stockconsultant.com/?TMUS
    • KULR KULR Technology stock watch, pullback to 1.25 triple support area with bullish indicators at https://stockconsultant.com/?KULR
×
×
  • Create New...

Important Information

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