Isn't Forum20.dll (August 2006) a more recent version?
From: Roy
Larsen <rlarsen@xxxxxco.nz>
To: equismetastock@yahoogroups.com
Date:
Tuesday, January 27, 2009, 3:28:52 PM
Subject: [EquisMetaStock Group] Re:
StochRSI
Hi Rick
I notice that you are not using the current
version of the Forum DLL.
My testing shoes that the older version's RSI
function returns a
different result to the newer version's RSI function if
your "vp"
variable is used to set the Variable Period
parameter.
There also appears to be a divide-by-zero error generated by
your
formula on some charts. Here's how I would lay out your formula to
to
make it easier (for me) to follow and fix. I have no idea where
your
floating point overflow error is coming from as I haven't been able
to
reproduce that error.
{ZZ StockRSI}
vp:=Fml("ZZ Trend
Cycle");
vr:=ExtFml("forumdll.VarRSI",C,vp);
vl:=ExtFml("forumdll.VarLLV",vr,vp);
vh:=ExtFml("forumdll.VarHHV",vr,vp);
ds:=Sum(vh-vl,3);
{divisor sum}
20; 80; 100*Sum(vr-vl,3)/(ds+(ds=0));
Here's
essentially the same formula but using the most recent version
of the Forum
DLL. Both formulas convert a zero divisor to 1. Placing
fixed-value line
outputs prior to the calculated output makes it
possible to call the
formula for an exploration and pick up the
calculated value (the last
output) instead of a constant.
{ZZ StockRSI}
vp:=Fml("ZZ Trend
Cycle");
vr:=ExtFml("forum.RSI",C,vp);
vl:=ExtFml("forum.LLV",vr,vp);
vh:=ExtFml("forum.HHV",vr,vp);
ds:=Sum(vh-vl,3);
{divisor sum}
20; 80;
100*Sum(vr-vl,3)/(ds+(ds=0));
Regards
Roy
--