in Search

OBV/EMA cross expert

Last post 12-22-2007, 8:41 by hayseed. 5 replies.
Sort Posts: Previous Next
  •  12-05-2007, 11:20 25960

    OBV/EMA cross expert

    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

  •  12-05-2007, 22:10 25967 in reply to 25960

    Re: OBV/EMA cross expert

    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

     

     

  •  12-20-2007, 4:08 26108 in reply to 25967

    Re: OBV/EMA cross expert

    Thanks Hayseed, spot on.

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

    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

  •  12-20-2007, 13:51 26114 in reply to 26108

    Re: OBV/EMA cross expert

    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 

  •  12-22-2007, 8:19 26136 in reply to 26114

    Re: OBV/EMA cross expert

    1st time seen a Hayseed code with only 1 'a',Merry Christmas to all.
  •  12-22-2007, 8:41 26137 in reply to 26136

    good one

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

View as RSS news feed in XML