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

Re: [amibroker] Need help wtih a scan



PureBytes Links

Trading Reference Links

Ed,

Here is the formula as I read it in your description:

fourCrows_With_engul=Ref(C,-4) < Ref(O,-4) AND Ref(H,-4) < Ref(H,-5) AND
Ref(L,-4) < Ref(L,-5) AND Ref(C,-3) < Ref(O,-3) AND Ref(H,-3) <
Ref(H,-4) AND Ref(L,-3) < Ref(L,-4) AND Ref(C,-2) < Ref(O,-2) AND
Ref(H,-2) < Ref(H,-3) AND Ref(L,-2) < Ref(L,-3) AND Ref(C,-1) <
Ref(O,-1) AND Ref(H,-1) < Ref(H,-2) AND Ref(L,-1) < Ref(L,-2) AND O > C
AND H > Ref(H,-1) AND L < Ref(L,-1);

Filter=fourCrows_With_engul > 0;

Buy=fourCrows_With_engul;

Anthony

"Edward M. Wylonis " wrote:

>  I have been reading the discussions for about two months now and I am
>
> impressed with the knowledge available here.  I have been trying to
> learn AFL by actually doing.  But I am having trouble understanding
> the process in the Automatic Analyzer.  I have read and re-read the
> User's Guide.  I coded a complete trading system based on what I have
> learned by reading the posts here and the User's Guide but I am
> getting erroneous results.  So I stripped all of the trading code to
> a basic scan for stocks.  I have provided the code and partial
> results below.  I would appreciate any guidance you can give me about
> what I am doing wrong or where I should go to find out why I am not
> getting stocks that exhibit the four black crows with an engulfing
> day following them when I do a scan.
>
> Thanks in Advance.
>
> Ed Wylonis
>
> ----------------------------------------------------------------------
>
> ----------------------------------------------------------------------
>
> ------------
> /*Scan for stocks that show four consecutive bars in which the Close
> is less than the Open and the High and Low are less than the previous
> day.  On the fifth day, the Open is greater than the Close and the
> High is greater than the previous day's High and the Low is lower
> than the previous day's Low.  Using Candlesticks this would equate to
> four solid red bars down (four crows) with the fifth bar engulfing
> the previous bar.
> */
>
> Filter =  (Sum(Volume,8)/8) > 100000
> AND Close > 2 AND Close < 20
> AND Ref(Close,-5) < Ref(Open,-5) AND Ref(Low,-5) < Ref(Low,-6) AND Ref
>
> (High,-5) < Ref(High,-6)
> AND Ref(Close,-4) < Ref(Open,-4) AND Ref(Low,-4) < Ref(Low,-5) AND Ref
>
> (High,-4) < Ref(High,-5)
> AND Ref(Close,-3) < Ref(Open,-3) AND Ref(Low,-3) < Ref(Low,-4) AND Ref
>
> (High,-3) < Ref(High,-4)
> AND Ref(Close,-2) < Ref(Open,-2) AND Ref(Low,-2) < Ref(Low,-3) AND Ref
>
> (High,-2) < Ref(High,-3)
> AND Ref(High,-1) > Ref(High,-2) AND Ref(Low,-1) < Ref(Low,-2) AND Ref
> (Close,-1) > Ref(Open,-1);
>
> Buy = Filter;
> ----------------------------------------------------------------------
>
> ----------------------------------------------
>
> Partial Results of Scan made on 2/25/03
>
> AGEN            Buy      2/21/03      8.23
> ALS            Buy      1/10/03      5.47
> ASPM            Buy      1/10/03      3.70
> CEI            Buy      2/26/03      14.65
> CYTO            Buy      1/10/03      3.33
> DFS            Buy      2/26/03      10.95
> ERICY      Buy      1/10/03      8.84
> FCGI            Buy      2/21/03      6.13
> GCO            Buy      1/10/03      19.84
> GNCMA      Buy      2/21/03      5.54
> GTI            Buy      2/21/03      3.59
>
>
>
>                    Yahoo! Groups Sponsor
                        ADVERTISEMENT


>
> 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 the Yahoo! Terms of Service.


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/