Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

custom indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
bobc
Posted : Sunday, April 30, 2006 3:27:57 PM
Registered User
Joined: 10/7/2004
Posts: 3
The following indicator was given to me in Metastock format. Can you convert it into a custom indicator for TC charts?
ADJHIGH:=If(HIGH<=Ref(CLOSE,-1),Ref(CLOSE,-1),HIGH);

ADJLOW:=If(LOW>=Ref(CLOSE,-1),Ref(CLOSE,-1),LOW);

ADJRANGE:=ADJHIGH-ADJLOW;

DBI:=((CLOSE-ADJLOW)/ADJRANGE)*VOLUME*(CLOSE-ADJLOW);

DSI:=((ADJHIGH-CLOSE)/ADJRANGE)*VOLUME*(ADJHIGH-CLOSE);

OBDI:=DBI-DSI;

Mov(OBDI,20,E)

It is written in MetaStock Language; but it's all math and shouldn't be too difficult. As for the abbreviations used, they are:

ADJHIGH = ADJUSTED HIGH, ADJLOW = ADJUSTED LOW, ADJRANGE = ADJUSTED RANGE, DBI = DAILY BUYING INTENSITY, DSI = DAILY SELLING INTENSITY, OBDI = ON BALANCE DAILY INTENSITY. Mov is a moving average. Ref refers to the past. Ref(Close,-1) refers to yesterday's close.

Thank you for your help.
Sir Bob
Bruce_L
Posted : Sunday, April 30, 2006 4:14:27 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I haven't tried to simplify it, but please try the following:

Select Chart Template | Add Indicator | Indicator.
-Visible: Checked
-Center Zero Line: Checked
-Plot using price scale: Unchecked
-Smoothing Average: 20
-Average Type: Exponential
-Indicator Formula: V * (((2 * C - C1 - L + ABS(C1 - L)) / 2) ^ 2 - ((H + C1 - 2 * C + ABS(H - C1)) / 2) ^ 2) / ((H - L + ABS(H - C1) + ABS(L - C1) + .00001) / 2)

You may wish to review the following:

Plotting Custom Indicators with Examples

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
bustermu
Posted : Sunday, April 30, 2006 4:59:54 PM
Registered User
Joined: 1/1/2005
Posts: 2,645
Sir Bob,

I think someone is pulling your leg.

TR = True Range
TRH = True Range High
TRL = True Range Low

OBDI = V*(2*C-TRH-TRL)

They likely meant to wind up with

OBDI = V*(2*C-TRH-TRL)/TR

A better formula would be

OBDI = V*(C-C1)/TR

I suggest you do not put a Moving Average on any, but plot them as Cumulative Indicators.

Bruce,

Did I make any mistakes?

Thanks,
Jim Murphy
Bruce_L
Posted : Sunday, April 30, 2006 6:28:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
bustermu,
Your simplification appears to be spot on. I will not express an opinion on the usefulness of either the original Metastock formula or your suggested replacement.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.