[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [EquisMetaStock Group] Formula Validation



PureBytes Links

Trading Reference Links

Simon


Try this

L<Ref(LLV(L,12),-1) OR Cross(Mov(C,63,S),Mov(C,30,S));

or possibly this

L<Ref(LLV(L,13),-1) OR Cross(Mov(C,63,S),Mov(C,30,S));

You should never test the current low for less than a range of lows that includes the current bar. The current low can only ever be greater or equal, >=, any range that include the current low. Therefore you must offset the range by one bar, Ref(LLV(L,13),-1), when you want to know if the current low is lower than the range as at the previous bar.

The Cross() function is useful for testing whether any two signals have crossed. The signal rising above should be the first parameter, and the signal dropping below should be the second parameter. The same applies if both signals are rising but one is rising faster than the other (or vice versa) - the first parameter will have the higher value after the cross and the second parameter will have the lower value after the cross.

Also, beware when mixing logical AND and OR expressions. It's best to enforce the logic you intend with brackets rather than leave it up to MetaStock to assign precedence. There is a precedence (which I can never remember), but the chances are you'll get it wrong if you don't use brackets. The brackets below keep the two conditions connected by a logical AND separated from the one condition with which they are ORed.

L<Ref(LLV(L,12),-1) OR ( Mov(C,30,S)<Mov(C,63,S) AND Ref(Mov(C,30,S),-1)>Ref(Mov(C,63,S),-1) );


Regards

Roy
www.metastocktips.co.nz




 
----- Original Message ----- 
From: SIMON WILKINSON 
To: equismetastock@xxxxxxxxxxxxxxx 
Sent: Monday, March 13, 2006 11:18 AM
Subject: [EquisMetaStock Group] Formula Validation


I would appreciate it if one of you Metastock wizards would cast an eye over
my exit code to see if it is correct.

What I am looking to achieve is an exit where either the 30 day moving
averages crosses below the 63 day moving average OR the price makes a new
low in the last 13 days.

L<Ref(LLV(L,13),0)
OR Mov(C,30,S)<Mov(C,63,S) AND Ref(Mov(C,30,S),-1)>Ref(Mov(C,63,S),-1)

Many thanks

Simon





SPONSORED LINKS Business finance course  Business to business finance  Small business finance  
      Business finance consultant  Business finance magazine  Business finance schools  


--------------------------------------------------------------------------------
YAHOO! GROUPS LINKS 

  a..  Visit your group "equismetastock" on the web.
    
  b..  To unsubscribe from this group, send an email to:
   equismetastock-unsubscribe@xxxxxxxxxxxxxxx
    
  c..  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 


--------------------------------------------------------------------------------



[Non-text portions of this message have been removed]



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/BefplB/TM
--------------------------------------------------------------------~-> 

 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/equismetastock/

<*> To unsubscribe from this group, send an email to:
    equismetastock-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/