Rank: Newbie
Groups: Registered, Registered Users Joined: 11/29/2008(UTC) Posts: 5
|
Afternoon folks. I was wondering if anyone had a formula to return securities making 20 day high or lows on the day of the exploration. I'm sure this topic has been beaten to death but I can't find anything in the searches except a 52 week new high and low. H>Ref(HHV(H,252),-1) Unfortuanately when I change the 252 to 20 it returns securities making new highs or lows sometime in the last 20 days and I'd like one that returns only securities making new highs or lows on the day of the exploration. I'd also like it to return the securities into the records tab and not the rejects tab. Thanks in advance for any help you may be able to offer.
Pete
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Hi Pete,
You were on the right path using that formula and changing the period accordingly but just needed a few more details.
If you copy and paste the code below into a new Exploration called "20 day Highs & Lows":-
{Column A} H>Ref(HHV(H,20),-1); {New 20 day High}
{ColumnB} L<Ref(LLV(L,20),-1); {New 20 day Low}
{Filter} colA=1 OR colB=1;
The filter will reject all securities that are not making a 20 day high or a 20 day low on the day of the exploration.
oz
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 11/29/2008(UTC) Posts: 5
|
Does this make sense?
C<REF(LLV(C,20),1)
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 11/29/2008(UTC) Posts: 5
|
Thanks Oz...we both posted our replys at the same time. I was running an exploration with
C<REF(LLV(C,20),1) in the filter and it didnt seem to be returning anything. The close formula didnt seem to be working at all but I tried the
H>Ref(HHV(H,252),-1) earlier and it returned all securities that made a 20 day high in the last 20 days. What makes it only return a security that makes a high or low today?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Pete, if you copy and paste all the code (including the filter) as suggested in my post above you will get the results you want.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 11/29/2008(UTC) Posts: 5
|
It works...thanks dude:) How would I get it to return the lowest close of the last 20 closes?
|
|
|
|
Rank: Advanced Member
Groups: Registered, Registered Users, Unverified Users Joined: 7/12/2007(UTC) Posts: 134 Location: Perth Western Australia
|
Once again you were going down the right path in post # 28402 however there is one crucial error in your code C<REF(LLV(C,20),1) and that is 1 means tomorrow (and therefore no results from the scan) whereas -1 means yesterday.
If you paste the code C<REF(LLV(C,20),-1) into the filter then you will get the report you are chasing.
|
|
|
|
Rank: Newbie
Groups: Registered, Registered Users Joined: 11/29/2008(UTC) Posts: 5
|
Thanks:) Lets hope I'm a better trader than programmer:)
|
|
|
|
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.