PureBytes Links
Trading Reference Links
|
Dans un courrier daté du 29/10/98 22:17:34 Heure d10iver Pari34 Madrid,
FrankKaeb@xxxxxxx a écrit :
> Anybody know how to calculate this? Anybody use this?
>
> Thanks
>
It's an old code ( I have not optimized it, not verified it since years, and
coded it directly from the original TAS&C article when published).
Seems also that there is a diference in the truehigh truelow calculation.
As I do not remember of the Article date Issue , I may have made a mistake.
Why not ?
{
==========
User Function "Choppy"
Code By Pierre Orphelin
www.sirtrade.com
}
inputs:tim(numericseries);
vars:timm(0),k(0);
timm=ceiling(tim);
value1=truerange;
value2=0;
for k=1 to timm begin
value2=value2+value1[k-1];
end;
value10=truehigh;
value11=truelow;
value3=highest(value10,timm)-lowest(value11,timm);
if value3<>0 then begin
value4=value2/value3;
end else begin
value4=0;
end;
if value4>0 then begin
value5=log(value4);
end else begin
value5=0;
end;
value6=log(timm);
if value6<>0 then begin
value7=100*value5/value6;
end else begin
value7=0;
end;
choppy=value7;
|