Part 1: A Better OBV
In the classical OBV (On-Balance Volume) indicator, it simply takes the idea from traditional tape reading - treat the "up tick" as Buy, "down tick" as Sell, and it assumes no change in price as neutral* (*which is not the case in tape reading).
When it comes to interpret the daily volume as such, errors will add up cumulatively. For example, there are days when a Doji Star with high volume just merely one cent higher than yesterday price and the whole day volume would be taken as a BUY Volume....
Here is a gentlemen, William C. Garrett, attempted to break down the daily volume into two parts in his book - "Torque Analysis of Stock Market Cycle". And, I think it makes sense.
.
William showed his method in Fig. 4.3 in his book, and we can derive the formula from it as follows:
He made the assumption that the trading volume is about linear over the trading hour, and thus it can derive how the paths the stock was traveled and workout the Buy Volume and Sell Volume accordingly as shown in the below chart:
.
Now a better OBV formula can be written as the cumulative number of (
Buy Volume -
Sell Volume).
It should named as Garrett OBV.
And, it can multiply the daily average price to it and named as Garrett Money Flow.
The following chart shows the plot of it and the comparison to Classical OBV.
(Click on the Chart to Zoom in)
.
Part 2: Time Segmented Money Flow
There is a proprietary volume indicator known as Time Segmented Volume (TSV). Since it is proprietary, probably the public would not know about the exact formula. But the concept is not difficult.
Let say for the Classical way of plotting of OBV, there is no clear sign for both entry and exit. We can then fix a look back period to compare it accumulation/distribution over it's own historical value. One simple way is to perform a MACD operation on the Garrett Money Flow.
Now we can compare the Garrett Money Flow Indicator to the Classic MACD indicator. In the above chart, they are using the same look back period for short MA, long MA and Signal.
From the chart, there are some very interesting point to take note.
Since the Volume Action is taken into account in this new indicator together with price. The Time Segmented Money Flow behave differently at couple of place on the above chart.
For examples: On March, April and July, the RED Line maintain above the Zero line to prevent any short trades -
this happened as a result of more Buying Volume than Selling Volume.
Note on Divergence:
When using a indicator as Time Segmented Money Flow, divergence would surely occur on and off. This is where Wyckoff 3rd principle comes into play -
"Effort vs Result" that is not matching. Meaning that the
cumulation of shares goes in one direction while the
price goes another direction.
"It ain't what you don't know that gets you
into trouble. It's what you know
for sure that just ain't so."
- Mark Twain
Attached is the AFL formula:
procedure
BackgroundSetting()
{
SetChartBkGradientFill
(
ParamColor
(
"BackgroundTop"
,
colorSkyblue
),
ParamColor
(
"BackgroudBottom"
,
colorWhite
),
ParamColor
(
"TitleBlock"
,
colorWhite
));
}
SetBarsRequired
( -2, -2 );
_SECTION_BEGIN
(
"Display Setting"
);
GraphXSpace = 10;
Backgroundsetting();
_SECTION_END
();
PathA1=
Ref
(
C
,-1)-
L
;
PathB1=
H
-
L
;
PathC1=
H
-
C
;
Path1 = PathA1+PathB1+PathC1;
UpShare1 = PathB1;
DnShare1 = PathA1+PathC1;
PathA2=
H
-
Ref
(
C
,-1);
PathB2=
H
-
L
;
PathC2=
C
-
L
;
Path2 = PathA2+PathB2+PathC2;
UpShare2 = PathA2+PathC2;
DnShare2 = PathB2;
Paths =
IIf
(
C
<
Ref
(
C
,-1),Path1,
IIf
(
C
>
Ref
(
C
,-1),Path2, 1));
UpShare=
IIf
(
C
<
Ref
(
C
,-1),UpShare1,
IIf
(
C
>
Ref
(
C
,-1),UpShare2,0));
DnShare=
IIf
(
C
<
Ref
(
C
,-1),DnShare1,
IIf
(
C
>
Ref
(
C
,-1),DnShare2,0));
FlowFactor = Avg;
FlowIn = UpShare/Paths*
Volume
*FlowFactor;
FlowOut = DnShare/Paths*
Volume
*FlowFactor;
NetFlow = FlowIn - FlowOut;
TotalFlow =
Cum
(NetFlow );
PlotType =
ParamList
(
"Type of Chart Plotting:"
,
"Cumulative|Time Segmented"
,1);
LBP =
Param
(
"LBP for Time Segmented Plot"
,26,10,50,1);
FastSmoothMF =
EMA
(TotalFlow,
int
(LBP/2));
SlowSmoothMF =
EMA
(TotalFlow,LBP);
DailyNetFlow=
IIf
(NetFlow==0,
MA
(Netflow,30),NetFlow);
if
(PlotType==
"Cumulative"
)
{
Plot
(TotalFlow ,
"Garrett Money Flow"
,
colorRed
,
styleThick
);
}
else
if
(PlotType==
"Time Segmented"
)
{
TSMF=FastSmoothMF - SlowSmoothMF;
Plot
(TSMF,
"Time Segmented Money Flow"
,
colorRed
,
styleThick
);
Plot
(0,
""
,
colorBlack
);
TSMFsig =
EMA
(TSMF,9);
Plot
(TSMFsig,
"Sig"
,
colorBlue
);
Histogram = TSMF-TSMFSig;
Plot
(Histogram,
"Histogram"
,
colorBlack
,
styleHistogram
);
}
Home