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 borsaholic
The formula works fine as an indicator and it also works fine as an exploration. Part of the problem may be that all securities are returning a ZERO value rather than +1 or -1.
As for the "Load Minimum Records" or "Load [censored]X Records" it is the radio button for one or the other that is enabled. If the Load Minimum Records button is enabled then the [censored]X setting above it will be ignored. For my test the the minimum records loaded is 80 bars. You can test this by adding "Cum(1)" (without the quotes) into an empty column of the exploration, which will then tell you how many bars were loaded for each security. See my version of the exploration below.
It shows hits on the current bar in Col A, the number of hits across all loaded data in Col B, and the number of bars scanned for each security.
Roy
{ColA}
e:=8;
zz:=C;
X:=If(If(PeakBars(1,zz,Se)> TroughBars(1,zz,Se),zz=Trough(1,zz,Se) AND BarsSince(zz=Trough(1,zz,Se))=TroughBars(1,zz,Se),0),1,
If(If(PeakBars(1,zz,Se)< TroughBars(1,zz,Se),zz=Peak(1,zz,Se) AND
BarsSince(zz=Peak(1,zz,Se))=PeakBars(1,zz,Se),0),-1,0));
X;
{ColB}
Se:=8;
zz:=C;
X:=If(If(PeakBars(1,zz,Se)> TroughBars(1,zz,Se),zz=Trough(1,zz,Se) AND BarsSince(zz=Trough(1,zz,Se))=TroughBars(1,zz,Se),0),1,
If(If(PeakBars(1,zz,Se)< TroughBars(1,zz,Se),zz=Peak(1,zz,Se) AND
BarsSince(zz=Peak(1,zz,Se))=PeakBars(1,zz,Se),0),-1,0));
Cum(X<>0);
{ColC}
Cum(1);
|