Rank: Advanced Member
Groups: Registered, Registered Users, Subscribers Joined: 7/25/2005(UTC) Posts: 1,042
Was thanked: 57 time(s) in 54 post(s)
|
Hi Robin
I did some work on simulating ERSA some years ago and here are a couple of indicators related to that work. The values generated by these indicators are not the same as ERSA, but when the results of an exploration are sorted they will be in the same order (as ERSA). If you provide an email address I'll send you whatever else I can find.
Roy
{Quad RSC Simulation} {Roy Larsen, 2011}
N:=Input("Quad RSC Simulation, Periods",2,1000,120); W1:=Input("Weight 1 (oldest)",0,100,20); W2:=Input("Weight 2",0,100,20); W3:=Input("Weight 3",0,100,20); W4:=Input("Weight 4 (newest)",0,100,40);
{Bars per quarter of total calculation period} Q:=LastValue(Int(N/4));
{ROCs for first quarter, half,} {three quarters and full range} BP:=Ref(O,1-Q); RC1:=100*(C-BP)/BP; {q1 ROC} Roc11:=Ref(RC1,-3*Q); BP:=Ref(O,1-2*Q); RC2:=100*(C-BP)/BP; {q2 ROC} Roc12:=Ref(RC2,-2*Q); BP:=Ref(O,1-3*Q); RC3:=100*(C-BP)/BP; {q3 ROC} Roc13:=Ref(RC3,-Q); BP:=Ref(O,1-N); RC4:=100*(C-BP)/BP; {q4 ROC} Roc14:=RC4;
{ROCs for successive quarters} Quarter1:=Roc11; Quarter2:=Roc12-Roc11; Quarter3:=Roc13-Roc12; Quarter4:=Roc14-Roc13; {most recent} Int(Quarter1*W1 + Quarter2*W2 + Quarter3*W3 + Quarter4*W4)/100;
{Quad ERSA Simulation} {Roy Larsen, 2008-2011}
N:=Input("Quad ERSA Simulation, Periods",2,1000,120); W1:=Input("Weight 1 (oldest)",0,100,20); W2:=Input("Weight 2",0,100,20); W3:=Input("Weight 3",0,100,20); W4:=Input("Weight 4 (newest)",0,100,40);
{Bars per quarter of total calculation period} Q:=LastValue(Int(N/4));
{ROCs for first quarter, half,} {three quarters and full range} Roc11:=Ref(ROC(C,Q,%),-3*Q); Roc12:=Ref(ROC(C,2*Q,%),-2*Q); Roc13:=Ref(ROC(C,3*Q,%),-Q); Roc14:=ROC(C,N,%);
{ROCs for successive quarters} Quarter1:=Roc11; Quarter2:=Roc12-Roc11; Quarter3:=Roc13-Roc12; Quarter4:=Roc14-Roc13; {most recent} Int(Quarter1*W1 + Quarter2*W2 + Quarter3*W3 + Quarter4*W4)/100;
|