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

[amibroker] help on AA please.



PureBytes Links

Trading Reference Links

my filter seems to work fine, however I'd like to output the result 
on the day which filter is true only.  Here is my AA.  TIA

// Filter spec:
// close is greater than 5
// 50 EMA volume is greater than 100,000 shares
// gapup percentage will be bigger than 20%
// gapup happend in the last 6 months.

Lastupdate = "Sep-1-2003";

xAxis = BarIndex () ;
EMA50vol = EMA(V,50) ;

LastGapupBar  = LastValue ( ValueWhen ( GapUp() AND (V > (3 * 
EMA50vol)), xAxis ) ); 
barsSinceGapup = LastValue ( BarsSince ( GapUp() AND (V > (3 * 
EMA50vol)) ) ); 
previousHighFromGapup = ValueWhen ( ( lastGapUpbar - 1 ) == xAxis , 
H )  ;
GapupHigh     = ValueWhen ( lastGapUpbar == xAxis , H ) ;

percentGapup = abs ( 100 * (( GapupHigh  - previousHighFromGapup ) / 
previousHighFromGapup )); // 

// Filter spec:
// close is greater than 5
// 50 EMA volume is greater than 100,000 shares
// gapup percentage will be bigger than 20%
// gapup happend in the last 6 months.
Filter = C > 5 AND EMA50vol > 100000 AND percentGapup > 20 AND 
barsincegapup < 130 ;

AddColumn ( pctGapup   ,"pctGapup",1.3 );



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for Your HP, Epson, Canon or Lexmark
Printer at Myinks.com. Free s/h on orders $50 or more to the US & Canada. http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/l.m7sD/LIdGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->

Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)
--------------------------------------------
Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

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