Rank: Advanced Member
Groups: Moderators, Registered, Registered Users, Subscribers Joined: 10/8/2010(UTC) Posts: 1,960
Thanks: 92 times Was thanked: 155 time(s) in 150 post(s)
|
James Garofallou’s article “Tracking Relative Strength in Four Dimensions” introduces an expanded calculation of the standard Relative Strength Comparative indicator. The MetaStock version requires separating the formula into several helper indicators. The final calculation of RS4r and RS5 is the only formula intended to be plotted on a chart. Please note: You must make the helper indicators first. If you change the names of the helper indicators, you must change the references to them in the RS4r formula. We recommend not changing the names unless you are familiar with the MetaStock formula language. Also note: You can change the funds used in the RS4r calculation by changing the ticker symbols used in the helper indicators. Each one lists a single fund's symbol on the first line of the formula.
- RS3 - FLCOX: Formula:
Code:sec:= Security("ONLINE:FLCOX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FNCMX:
Formula:
Code:sec:= Security("ONLINE:FNCMX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FPADX:
Formula:
Code:sec:= Security("ONLINE:FPADX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSAGX:
Formula:
Code:sec:= Security("ONLINE:FSAGX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSMDX:
Formula:
Code:sec:= Security("ONLINE:FSMDX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSPGX:
Formula:
Code:sec:= Security("ONLINE:FSPGX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSRNX:
Formula:
Code:sec:= Security("ONLINE:FSRNX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSSNX:
Formula:
Code:sec:= Security("ONLINE:FSSNX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FSUTX:
Formula:
Code:sec:= Security("ONLINE:FSUTX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FTBFX:
Formula:
Code:sec:= Security("ONLINE:FTBFX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
- RS3 - FXAIX:
Formula:
Code:sec:= Security("ONLINE:FXAIX.O", C);
rs:= C/sec;
mafa:= Mov(rs, 10, E);
mame:= Mov(mafa, 7, S);
masl:= Mov(mafa, 15, S);
mavs:= Mov(masl, 30, S);
rsfa:= mafa > mame;
rsme:= mame > masl;
rssl:= masl > mavs;
rsval:= If(rsfa AND rsme AND rssl, 10, 0) +
If(rsfa AND rsme AND rssl=0, 9, 0) +
If(rsfa=0 AND rsme AND rssl, 9, 0) +
If(rsfa=0 AND rsme AND rssl=0, 5, 0);
RS4r:
Formula:
Code:rsFXAIX:= FmlVar("- RS3 - FXAIX","RSVAL");
rsFNCMX:= FmlVar("- RS3 - FNCMX","RSVAL");
rsFSMDX:= FmlVar("- RS3 - FSMDX","RSVAL");
rsFSSNX:= FmlVar("- RS3 - FSSNX","RSVAL");
rsFSPGX:= FmlVar("- RS3 - FSPGX","RSVAL");
rsFLCOX:= FmlVar("- RS3 - FLCOX","RSVAL");
rsFPADX:= FmlVar("- RS3 - FPADX","RSVAL");
rsFSAGX:= FmlVar("- RS3 - FSAGX","RSVAL");
rsFSUTX:= FmlVar("- RS3 - FSUTX","RSVAL");
rsFTBFX:= FmlVar("- RS3 - FTBFX","RSVAL");
rsFSRNX:= FmlVar("- RS3 - FSRNX","RSVAL");
RS4r:= ( (rsFXAIX + rsFNCMX + rsFSMDX + rsFSSNX +
rsFSPGX + rsFLCOX + rsFPADX + rsFSAGX + rsFSUTX +
rsFTBFX + rsFSRNX) / 11 ) * 10;
RS5:= (Sum(RS4r, 15) / 15);
RS4r;
RS5
|