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
|
|
|
|
Rank: Advanced Member
Groups: 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
|
|
|
|
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
|
|
|
|
Rank: Advanced Member
Groups: 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
|
|
|
|
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.
|
|
|
|
Rank: Advanced Member
Groups: 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.