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

Notification

Icon
Error

Options
Go to last post Go to first unread
longjon  
#1 Posted : Wednesday, December 5, 2007 11:20:34 AM(UTC)
longjon

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/5/2007(UTC)
Posts: 2

Hello all,

Firstly, I am somewhat new to the whole technical analysis/Metastock side of things, but am rather enjoying it thus far (I haven’t lost any money yet..or made any for that matter! Still learning learning learning..). I am now at the stage where I am looking to tweak some of the indicators/alerts that MS (Pro 10) has to offer.

As such, I am trying to figure out an expert that signals/alerts me when the OBV crosses above/below its 20period EMA. I have had a look through the forums but could not find anything that looks like it may do it.

Has anyone coded this yet and would be willing to share it? I have had a good few goes in Metastock but it seems that I am not yet sufficiently versed in the required syntax.

Any help would be hugely appreciated.

Many thanks

Jon

hayseed  
#2 Posted : Wednesday, December 5, 2007 10:10:17 PM(UTC)
hayseed

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey jon.... using the expert editor you can set trends, highlights and alerts among other things....

for the buy alert the code could be something like;

//---------------------------

a:=Mov(OBV(),20,S);

OBV() > a AND Ref(OBV(),-1) < Ref(a,-1)

//--------------------------

for the sell alert the code could be something like;

//-------------------------

a:=Mov(OBV(),20,S);

OBV() < a AND Ref(OBV(),-1) > Ref(a,-1)

//-------------------------

highlights are sometimes convienent,the long might be;

//-----------------------

a:=Mov(OBV(),20,S);
OBV() > a

//----------------------

the short code might be;

//-----------------------

a:=Mov(OBV(),20,S);
OBV() < a

//----------------------

there are other methods such as the 'cross' function..... in the alert section it helps to have a text message associated with that particular expert.....h

longjon  
#3 Posted : Thursday, December 20, 2007 4:08:06 AM(UTC)
longjon

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 12/5/2007(UTC)
Posts: 2

Thanks Hayseed, spot on.

One final request, if I can push my luck a bit..[:)]

How could I input this into a bespoke explorer? I would like to be able to run an exploration against a set of instruments that only returns those where the OBV has crossed (up) the 20 period MA in the last period (daily, hourly, etc)?

Can this be done with the above script, or does it need additional tweaking?

Thanks again

Jon

hayseed  
#4 Posted : Thursday, December 20, 2007 1:51:55 PM(UTC)
hayseed

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey jon..... you could just put those exact codes in the explorer and include each colum in the filter section..... you could also use the cross function, such as below......h


{Exploration notes column c and column d are using cross function}

Col A: buy

a:=Mov(OBV(),20,S);

OBV() > a AND Ref(OBV(),-1) < Ref(a,-1)

//----------------------------------------------
Col B: sell

a:=Mov(OBV(),20,S);

OBV() < a AND Ref(OBV(),-1) > Ref(a,-1)

//----------------------------------------------
Col C: buy cross

a:=Mov(OBV(),20,S);

Cross(OBV() , a)

//------------------------------------------
Col D: sell cross

a:=Mov(OBV(),20,S);

Cross(a, OBV() )

//---------------------------------------
Filter colA OR colB OR colC OR colD

Filter enabled Yes
Periodicity Daily
Records required 32767

uasish  
#5 Posted : Saturday, December 22, 2007 8:19:34 AM(UTC)
uasish

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 8/13/2005(UTC)
Posts: 170

Thanks: 7 times
1st time seen a Hayseed code with only 1 'a',Merry Christmas to all.
hayseed  
#6 Posted : Saturday, December 22, 2007 8:41:25 AM(UTC)
hayseed

Rank: Advanced Member

Groups ready for retrieval: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

hey uasish.... [:D] .... hahaha.... good one ..... merry christmas to you and the rest of our gang here ...... and hope we all have a wonderfull 2008.....h

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.