PureBytes Links
Trading Reference Links
|
In-Reply-To: <0GNS00B409M3MB@xxxxxxxxxxxxxxxxxxx>
Hi Steve,
Our code is almost identical!! which at least suggests my coding
isn't too bad (:-) and on the right lines.
I have been mainly experimenting with FSTE data but also with the S&P emini.
The FTSE data gives surprisingly good results and the emini gives positive
results, too, although the equity curve isn't brilliant. However, this is
the straight code without any stops, hence my original post to check the
stops and exits with someone else.
Anyway, I was surprised by your comments so I looked through your code and I
think there are a couple of errors which may affect the results. In fact, I
made the changes in my code and it turned positive results into negative
ones. I've annotated the errors in the copy of the code below.
What market(s) were you trying it on? Give it another shot and see what you
think. Drop me a line if you want to talk further.
Cheers,
Ian
>
> Barnes' books are filled with conventional wisdom. Sadly,
> we all know that most of the so-called conventional wisdom
> just ain't so.
>
> The notion of counting pivot points with an amplitude filter
> is one way to follow a trend. But you will not be happy with
> the results if you try it.
>
> Barnes says to optimize his parameters for each and every
> market. That should have been a flag on the play for me; but
> like a darned fool, I bought the stupid book anyway.
>
> It does not stand up well under test. See for yourself with
> my code below.
>
> Steve Gibson...
>
> {Barnes Day Trade simpified indicator 6/98 S.Gibson}
> {Make plot 1 & 2 histograms}
>
> Inputs: Unit(.125), A3(6);
> Vars: NL(0), NH(0), NLctr(0), NHctr(0), LNH(0), LNL(0),
> LNLctr(0), LNHctr(0), TR(0);
>
> If Date > Date[1] then begin
> NL = close;
> NH = close;
> LNH = close;
> LNL = close;
> end;
> If Date = Date[1] then begin
> {Look for first trend when TR = 0}
> If TR = 0 then begin
> if close - unit >= NH then begin
> NH = close;
> LNL = close;
> LNLctr = 0;
> end;
> if close - unit >= LNH then begin
> LNH = close;
> LNHctr = LNHctr + 1;
> if LNHctr >= A3 then TR = 1;
> end;
> if close + unit <= NL then begin
> NL = close;
> LNL = close; ********** LNH
> LNHctr = 0;
> end;
> if close + unit <= LNL then begin
> LNL = close;
> LNLctr = LNL + 1; *********** LNLctr
> If LNLctr >= A3 then TR = -1;
> end;
> end;
> {When in an uptrend. TR = 1}
> If TR = 1 then begin
> if close - unit >= NH then begin
> NH = close;
> NHctr = NHctr + 1;
> NL = close;
> NLctr = 0;
> if NHctr >= A3 then TR = 1; {?}
> end;
> if close + unit <= NL then begin
> NL = close;
> NLctr = NLctr + 1;
> If NLctr >= A3 then TR = -1;
> end;
> end;
> {When in a Downtrend. TR = -1}
> If TR = -1 then begin
> If close + unit <= NL then begin
> NL = close;
> NLctr = NLctr + 1;
> NH = close;
> NHctr = 0;
> If NLctr >= A3 then TR = -1; {?}
> end;
> If close - unit >= NH then begin
> NH = close;
> NHctr = NHctr + 1;
> if NHctr >= A3 then TR = 1;
> end;
> end;
>
> plot1(0,"");
> if TR = 1 then plot2(TR,"");
> if TR = -1 then plot3(TR,"");
> end;
>
>
>
>
>
>
>
>
|