[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reactivity code?



PureBytes Links

Trading Reference Links

:Yes I have this one.
:Robert


Here's the user function, 'Reactivity":
{ 
 User function : Reactivity as in Al Gietzen's book "Real-Time Futures Trading".
  (code by Dave DeLuca via Omega bbs.)

 Vars: r = range, Rm = mean range,  vz = total volume for lookback period, 
            Vm = mean volume, ar = aspect ratio.
 Rm and Vm are calculated proportionately to the length selected (8*Len). 
} 
 
Inputs: Len(numeric);

Vars : r(0), Rm(0), vz(0), Vm(0), ar(0), mom(0);

r = Highest(High, Len) - Lowest(Low, Len);
vz = Summation(V, Len);
Rm = rMean(Len);
Vm= Xaverage(Summation(V, Len), 8 * Len);
ar = (r / Rm) / (vz / Vm);
mom = Mean - Mean[Len];

Reactivity = ar * mom;


------------------------------------------
:Inputs: rLen(5), xLen(4);
:Vars : r(0);
:
:PLOT1(Reactivity(rLen), "Reactivity");
:PLOT2(rmean(rLen), "rmean");
:PLOT3(1.2 * -rmean(rLen), "-rmean");
:PLOT4(Xaverage(Reactivity(rLen), xLen), "");