Rank: Member
Groups: Registered, Registered Users Joined: 11/15/2008(UTC) Posts: 17
|
Hey Guys,
I've got a problem with the HHV function and was hoping somebody could help me.
I want a signal to be generated when the open of the current bar is greater than the HHV of the high of the PREVIOUS 8 periods (i.e, the open is higher than the HHV of the preceeding 8 periods excluding today). The problem is that if the open IS greater, then that open is acting as the new HHV and hence it's equal to the HHV and NOT greater than it (I assume this is what's happening because as soon as the HHV function is used i get absolutely no signals). Is there anyway to sidestep this problem - to use the HHV function EXCLUDING the current bar.
Alternatively, if the above isn't possible, is it possible to convert a formula (say HHV(H,8)) into it's applicable dollar value - e.g $2?
I think I could sidestep this problem by using (Ref(O,+1))>(HHV(H,8)) and then delaying my buy by one day, but as soon as I choose the delay option, I receive absolutely no signals. Am i missing something obvious?
This is driving me nuts.
Any help greatly appreciated,
Cheers,
AMSH
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi AMSH,
This should solve your problem by using Ref(data array,-1) which refers to "the value of the data array as of yesterday" (i.e. -1).
OPEN>Ref(HHV(H,7),-1)
Cheers
oz
|
|
|
|
Rank: Member
Groups: Registered, Registered Users Joined: 11/15/2008(UTC) Posts: 17
|
Cheers Oz,
Works perfectly.
Many thanks.
|
|
|
|
Users browsing this topic |
Guest (Hidden)
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.