logo
Welcome Guest! To enable all features please Login or Registers.

Notification

Icon
Error

Options
Go to last post Go to first unread
asokas  
#1 Posted : Sunday, July 2, 2006 1:48:38 PM(UTC)
asokas

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/2/2006(UTC)
Posts: 3

Hello, I'm new to this forum so forgive me if this has been asked often before. I would like to create an Explorer study that will detect and sort securities according to when a security makes a new all-time high or new all-time low. It's basically a Gann thing. Basically, it needs to look back on the entire data series, APART from the last bar, and determine that the latter has made a new all-time high or new all-time low. I am unclear as to how to do this with the existing functions (e.g. Highest() ) since they seem to include the entire data array including the last datapoint under examination. Any help, advice, or code would be appreciated. Regards, Asoka
asokas  
#2 Posted : Sunday, July 2, 2006 2:06:49 PM(UTC)
asokas

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/2/2006(UTC)
Posts: 3

I obviously derive considerable inspiration from being on this this forum, because the answer seemed to come to me even as I was typing out the question! Basically, the filter rule in Explorer is: New All Time Highs: High=Highest(High) New All Time Lows: Low=Lowest(Low) Asoka
wabbit  
#3 Posted : Tuesday, July 4, 2006 12:37:29 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Good work asokas! You might want to consider, the situation where the stock is revisiting the previously existing high/low?? These will get caught in your code. You might want this, you might not? If you want a NEW high or low, then consider: New All Time Highs: H > Ref(Highest(H),-1) New All Time Lows: L < Ref(Lowest(L),-1) Be careful, the results of this code might not be the same in an indicator, as an exploration, as the system tester etc due to the number of data points loaded. Make sure you load the same number of data points into each aspect of MS to ensure the results are consistent. Hope this helps. wabbit :D
asokas  
#4 Posted : Tuesday, July 4, 2006 6:58:21 AM(UTC)
asokas

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 7/2/2006(UTC)
Posts: 3

Yes, this is better. Thank you. Since I'll be visually inspecting the Explorer results, it won't make much difference to me either way. But yours is the better way to do it. Asoka :D
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.