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

RE: [EquisMetaStock Group] Question...



PureBytes Links

Trading Reference Links

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/