Stock Portfolio Organizer

The ultimate porfolio management solution.

Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
For Portfolio Manager Click Here

WiseTrader Toolbox

#1 Selling Amibroker Plugin featuring:

Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
Find Out More Here

OBTR Histogram for Metastock
MIKE1
about 12 years ago
Metastock

Rating:
3 / 5 (Votes 4)
Tags:
metastock, bands

On-Balance True Range (OBTR) is my attempt to improve on the old On-Balance Volume study (OBV). In OBV you add today’s volume to a running total of volume if the market closes higher than yesterday, and you subtract today’s volume from a running total of volume if the market closes lower than yesterday. The OBV line confirms the current trend by making new highs or new lows along with prices, or it warns of a possible trend reversal by diverging from price action.

OBV is a reasonably good trend-following indicator, but it has two problems. First, you cannot get accurate volume figures until the day after each trading session. If you trade from the daily charts, you are not able to update your OBV study before the markets open the next day. If you are an intraday trader, you must rely on tick volume, rather than actual volume, if you want to use the OBV study. Tick volume, however, can be very misleading. Tick volume tells you the number of trades made per intraday period, but it does not tell you the actual number of contracts traded. For example, a tick volume of 45 for a 15 minute period tells you that there were 45 trades during that time, but the trades could have averaged one contract per trade or 100 contracts per trade. The second problem with OBV is that gaps are fairly common on the daily charts and can represent a considerable change in price, but obviously no volume occurs in gaps. Volume is not representative of a market’s real strength or weakness on days where there is a gap between yesterday’s closeand today’s high or low.

My OBTR study solves the two problems of OBV. Since there is a high statistical correlation between volume and True Range, I simply substitute True Range for volume in the OBV study. True Range is usually just the difference between a period’s high and low. However, if the previous close is below the current period’s low, True Range is the difference between the current high and the previous close. If the previous close is above the current high, True Range is the difference between the previous close and the current low. In other words, True Range fills in the gaps. On-Balance True Range is an improvement to On-Balance Volume because you don’t have to rely on tick volume or wait until tomorrow to obtain actual volume figures and because OBTR more accurately reflects a market’s real activity when there is a gap.

To calculate OBTR, just add the current period’s True Range to a running total of True Ranges if the market closes higher than the previous period’s close or subtract the current period’s True Range from a running total of True Ranges if the market closes lower than the previous period’s close.

For my own trading, I calculate a nine-period Exponential Moving Average(EMA) of OBTR and use OBTR crossings of the EMA to confirm divergences between price and oscillators (e.g. MACD, RSI, and Stochastics). Bullish divergence occurs when a market makes a low, rallies, and then declines to a lower low,while an oscillator makes a low, rallies, and then declines to a higher low.Bearish divergence occurs when a market makes a high, declines, and then rallies to a higher high, while an oscillator makes a high, declines, and then rallies to a lower high. Divergence is a clue – an early warning sign that the trend might change very soon, but we must wait for the market itself to tell us which divergences to act upon and which to ignore. Waiting for OBTR to cross its EMA before you buy or sell will filter out many unprofitable oscillator signals.

In the Cotton example, RSI diverged from the new price lows at A and B. but we did not buy because OBTR did not cross above its EMA. At c, prices fell to another new low, but RSI made another higher bottom. We bought Cotton on the opening four days after c because OBTR rose above its EMA in a bullish divergence environment. As the uptrend progressed, RSI diverged from new price highs at D, E, and F. We didn’t exit our long position or sell short, however,because OBTR remained above its EMA. The trend following component of our method kept us well-positioned in the uptrend despite the bearish signals from the RSI.

On the Eurodollar chart, there was bearish divergence between the new price high and the lower Stochastics high at B. We sold short three days after the high when OBTR crossed below its EMA. At points C, D, E, and F. Stochastics formed a series of bullish divergences, but we didn’t exit our short position or go long because OBTR remained below its EMA. At G. Eurodollars fell to another new low, but once again Stochastics formed a higher bottom. We exited our short position and went long two days after the low when OBTR crossed above its EMA in the bullish divergence environment.

Integrating oscillators and OBTR creates a simple yet powerful trading method. My On-Balance True Range study provides reliable trend-following confirmation of oscillator divergence signals in all time frames from intraday charts to the daily and weekly charts. I hope you will find OBTR to be a useful addition to your technical toolbox. Best wishes for profitable trading.

Thomas A. Bierovic is an independent futures trader and technical analysis teacher with 24 years of successful trading experience. Tom has presented highly rated seminars throughout the U.S., Europe, the Middle East, Asia, and the Far East. He teaches technical analysis for the Chicago Board of Trade, the National Futures Association, and Futures magazine’s Futures &Options School. He also conducts individualized, one-on-one workshops forboth independent and institutional futures traders.

Tom is the author of A Synergetic Approach to Profitable Trading and the instructor on Futures magazines’ video series Synergetic Technical Analysis.SynergyFax, his daily fax advisory service, gives specific recommendations for all major U.S. futures markets.

Similar Indicators / Formulas

Standard Error Bands
Submitted by star123 over 11 years ago
Better Bollinger Band
Submitted by rkkarnani about 12 years ago
Adjustable Trading Bands by Tushar Chande
Submitted by kaiji over 12 years ago
Price Band Metastock Formula
Submitted by johnny11 over 11 years ago
Moving Average of Only One Day of a the Week
Submitted by star123 over 11 years ago
Ortalama fiyat degiskenligi gostergesi
Submitted by tasma about 10 years ago

Indicator / Formula

Copy & Paste Friendly
{OBTR Histogram Channel - FP}
OBTR:=Cum(If(C > Ref(C,-1),1,-1) *
(If(Ref(C,-1) < L,{Then} (H - Ref(C,-1)),
{Else}If(Ref(C,-1) > H,{Then} (Ref(C,-1) - L),
{Else} (H - L)))));
ShortMA:= Input("ShortMA -",1,200,8);
LongMA:= Input("LongMA -",1,200,17);
SignalMA:= Input("SignalMA - ",1,200,9);
MACDOBTR:=Mov(OBTR,ShortMA,E) - Mov(OBTR,LongMA,E);
If(MACDOBTR>=Ref(MACDOBTR,-1),MACDOBTR,0);
If(MACDOBTR<Ref(MACDOBTR,-1),MACDOBTR,0);
Mov(Mov(MACDOBTR,ShortMA,E)-Mov(MACDOBTR,LongMA,E), SignalMA,E);

Periods:= Input("Enter number of periods", 1, 200, 20);
UpperChannelLine:= Ref(HHV(MACDOBTR, Periods), -1);
LowerChannelLine:= Ref(LLV(MACDOBTR, Periods), -1);
UpperChannelLine; 
(UpperChannelLine + LowerChannelLine)/2;
LowerChannelLine;
{End}

2 comments

1. walid

hi adminstrator please convert this to amibroker code with best regards

2. tigernifty

hai, this will show some error… pls rectify.. thx

Leave Comment

Please login here to leave a comment.

Back