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

Re: [amibroker] A More Efficient Way?



PureBytes Links

Trading Reference Links

Buy = Cross(MA( Close, 25 ), MA( Close,75 )) AND Ref(BarsSince(Cross(MA( Close, 25 ), MA( Close,75 ))),-1) > 10;

 
----- Original Message -----
From: ldriker
Sent: Thursday, June 30, 2005 11: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





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