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

[amibroker] Help with MS volatility stop loss.



PureBytes Links

Trading Reference Links

Hi Group:

Can anyone give me a steer in the right direction with
this Metastock code, please?

Designed to be a volatility based stop, based on Stdev
of the Ln of the percent price change.

M:= Mov(((C/Ref(C,-1))-1),14,E);
SD:= Stdev(((C/Ref(C,-1))-1),14);
R:= M+(2.326)*(SD);
{R at 2.326 will give a 99% confidence rating}
C*Exp(R)*1; 

Here is what I have so far:

x = c/ref(c,-1) ; // what is the ((C/Ref(C,-1))-1)
part of the MS code. Is this the value for yesterday?

M = ema(x,14);
Sd = stdev( x,14);
R = M - 2.326 * sd;
Stop = C * exp( R ) * 1; is this correct for AB?

Regards

ChrisB



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


------------------------ 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/GHeqlB/TM
--------------------------------------------------------------------~-> 

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html

 
Yahoo! Groups Links

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

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

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