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

Notification

Icon
Error

Options
Go to last post Go to first unread
schlepp25  
#1 Posted : Thursday, February 17, 2011 1:50:45 PM(UTC)
schlepp25

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/17/2011(UTC)
Posts: 2
Location: Toronto

Hi all, I'm new to metastock (and coding). I've been trying to mess around with the formulas and come up with a formula to search for trading ranges that are in absorption.

So I'm looking for Wyckoff ideas
1. stocks in an uptrend and are in consolodation
2. i'd like a trading range that is fairly tight - small ranges
3. idealy volume starts drying up or decrease in selling pressure
4. i'd like majority of the closes to be greater than half the daily range or higher

I've come up with the code below
i've tried it and it doesn't work very well.
Even if I could code a search to find TradingRanges that would be a big step and I could do the rest

I've arbitrarily used 5 days to look back just cause I thought it would be easier to test, but really trading ranges i'm looking for could be much longer
I've also used .05(or5%) arbitrarily. that probably should be smaller

AvgTR:=HHV(H,5)-LLV(L,5);
volavg:=Sum(V,150)/150;
volavg5days:=Sum(V,5)/5;
dailyrange:=H-L;
highclose:=If(C>=O+dailyrange/2,1,0);

TRcond:=If(AvgTR/C<=.05,1,0);
VolCond:=If(volavg5days<volAvg,1,0);
SumhighClose:=If(Sum(C>highclose,5)>=3,1,0);

accrang:=(sumhighclose*volcond*trcond);
accrang

thanks in advance for any help
Cheers

Chris
wabbit  
#2 Posted : Thursday, February 17, 2011 2:58:43 PM(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)
Quote:
closes to be greater than half the daily range or higher


Code:

C > (L + 0.5*(H-L));



wabbit [:D]

schlepp25  
#3 Posted : Thursday, February 17, 2011 3:33:52 PM(UTC)
schlepp25

Rank: Newbie

Groups: Registered, Registered Users
Joined: 2/17/2011(UTC)
Posts: 2
Location: Toronto

wabbit wrote:
Quote:
closes to be greater than half the daily range or higher


Code:

C > (L + 0.5*(H-L));



wabbit [:D]



Ah yes, good catch

thanks Sir Wabbit
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.