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

Re: [amibroker] A More Efficient Way?



PureBytes Links

Trading Reference Links

This will probably work:

Buy=MA( Close, 25 ) > MA( Close,75 )  AND sum(MA( Close, 25 ) < MA( 
Close,75 ),11)==10;

Ron D






----- Original Message ----- 
From: "ldriker" <leoker@xxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Thursday, June 30, 2005 4:22 PM
Subject: [amibroker] A More Efficient Way?


> Following is a simple buy signal premised upon the 25 day simple
> moving average just having crossed above the 75 day simple moving
> average coupled with the 25 day simple moving average being below
> the 75 day simple moving average for each of the last 10 days.
>
> How might this code be written more efficiently?
>
> Buy = MA( Close, 25 ) > MA( Close,75 )  AND
> MA( Ref( Close, -1 ), 25) < MA( Ref( Close, -1 ), 75 )  AND
> MA( Ref( Close, -2 ), 25) < MA( Ref( Close, -2 ), 75 )  AND
> MA( Ref( Close, -3 ), 25) < MA( Ref( Close, -3 ), 75 )  AND
> MA( Ref( Close, -4 ), 25) < MA( Ref( Close, -4 ), 75 )  AND
> MA( Ref( Close, -5 ), 25) < MA( Ref( Close, -5 ), 75 )  AND
> MA( Ref( Close, -6 ), 25) < MA( Ref( Close, -6 ), 75 )  AND
> MA( Ref( Close, -7 ), 25) < MA( Ref( Close, -7 ), 75 )  AND
> MA( Ref( Close, -8 ), 25) < MA( Ref( Close, -8 ), 75 )  AND
> MA( Ref( Close, -9 ), 25) < MA( Ref( Close, -9 ), 75 )  AND
> MA( Ref( Close, -10 ), 25) < MA( Ref( Close, -10 ), 75 )
>
>
>
>
>
>
>
>
> 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
>
>
>
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG Anti-Virus.
> Version: 7.0.323 / Virus Database: 267.8.8/36 - Release Date: 7/1/2005
>
> 



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/