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

[amibroker] Re: Help with MS volatility stop loss.



PureBytes Links

Trading Reference Links

Chris

I think your interpretation is correct, except that the line 
R = M - 2.326 * Sd  should be
R = M + 2.326 * SD

The minus 1 just removes the value to the left of the decimal in the 
division.  For example, if C = 35.00 and Ref(C,-1) = 34.75, then C / 
Ref(c,-1) is 1.00719.  Subtracting 1 leaves you with .00719 - the 
percentage difference between the 2 values.

Also I don't understand the "*1" at the end of Stop.  Why bother.  
You also mentioned something about Ln of the price change.  I don't 
see this in the code anywhere.  Are you sure the MS code is accurate, 
and complete?  The Stop values produced by this code is about 3 times 
the close - something seems wrong

Rick
--- In amibroker@xxxxxxxxxxxxxxx, kris45mar <kris45mar@xxxx> wrote:
> 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/