PureBytes Links
Trading Reference Links
|
At 5:28 PM -0400 6/19/99, VBatla@xxxxxxx wrote:
>Any ideas of what's wrong with this code?
>TB
>
>Vars: t1(0), t2(0), t3(0), t4(0), t5(0), t6(0),
> w(0), x(0), y(0), z(0) ;
>
> t1 = @RSI(Close, 13);
> t2 = @ADX(130);
> t3 = @PercentR(13);
> t4 = @SlowK(130);
> t5 = @XAverage(Close, 13);
> t6 = @XAverage(Close, 130);
>
> w = @SquareRoot( ((t5+t1)*((0+t5)-t1)) + (t1*t1) ) ;
> x = @SquareRoot( (t2*t2) + ((t2+t6)*((0-t2)+t6)) ) ;
> y = @SquareRoot( ((t3+t4)*((0-t3)+t4)) + (t3*t3) ) ;
> z = (w * @ExpValue(0.0)) + (x - t4) + (y - t5) ;
>
> if (CurrentBar >= 2) then begin
> if z crosses below w then buy tomorrow at the open;
> if w crosses below z then sell tomorrow at the open;
> end;
Is this some sort of an algebra quiz? With a little manipulation, all of
the above reduces to:
Vars: t5(0), t6(0);
t5 = @XAverage(Close, 13);
t6 = @XAverage(Close, 130);
if (CurrentBar >= 2) then begin
if t6 crosses below t5 then buy tomorrow at the open;
if t5 crosses below t6 then sell tomorrow at the open;
end;
Bob Fulks
>
|