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

RE: [EquisMetaStock Group] Question...



PureBytes Links

Trading Reference Links

Yngvi,

Thanks for this.  The problem is that I am essentially coding:

{buy signal}
H>Ref(H, -1) 
AND Ref(H,-1)<Ref(H,-2) AND Ref(L,-1)<Ref(L,-2) AND 
Ref(H,-2)<Ref(H,-3) AND Ref(L,-2)<Ref(L,-3)

But I want to allow for inside days and have them not count.  Then I
want to code in percentage thresholds.

I really wanted to use recursion for this and not have it procedural.
Seems to me like ref is one of the places where you'd really want to
pass a variable into it.

Any ideas how I can achieve what I want to do in an elegant way?  Would
AIQ do a better job?

Thanks.



John

-----Original Message-----
From: Yngvi Hardarson [mailto:hardy@xxxxxxxxxxxxx] 
Sent: 07 March 2003 14:08
To: equismetastock@xxxxxxxxxxxxxxx
Subject: RE: [EquisMetaStock Group] Question...


John. 

You've just stumbled over one of the restrictions of the Formula
language. The time period reference in Ref(,) must be a constant.

One workaround would be along these lines:

p1:=If(Ref(Inside(), -1),-1,-2);
H<If(p1=-1,Ref(H,-1),If(p1=-2,Ref(H,-2),0));

Are you sure you want to use "<" instead of ">"?

Best regards,
Yngvi

-----Original Message-----
From: John Rowlinson [mailto:john@xxxxxxxxxxxxxxx]
Sent: Friday, March 07, 2003 11:12
To: equismetastock@xxxxxxxxxxxxxxx
Subject: [EquisMetaStock Group] Question...


Hello,

I am trying to create a swing trading system.  If I have an inside day
then I want to ignore it - ie step back another day.  So I started by
assigning a vartiable, p1 as follows:

p1:=If(Ref(Inside(), -1),-1,-2);

Then I want check for, amongst other things, a higher high.  So I do:

H<Ref(H,p1)

But this doesn't work.  It says 'This variable or expression must
contain only constant data.'

And this gives the same error:

H<Ref(H,If(Ref(Inside(), -1),-1,-2))

Is it because I can't have nested Ref's?  Anyone any idea how I could
overcome this?

Thanks



John Rowlinson


To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ 




To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to
http://docs.yahoo.com/info/terms/ 



To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/