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

Re: [amibroker] Re: Need help wtih a scan



PureBytes Links

Trading Reference Links

Ed,

By looking at your results....and the image file...where is the buy
arrow...I do not see it on the chart....also, I do not believe the scan
should be picking up Mutual funds...Mutual funds do not report Open ,
High and Low figures...do they ?

Check this:
While in the AA window..click on  Settings....and in the General
window...See if  PERIODICITY is set to DAILY, then run the scan
again.....

Anthony

"Edward M. Wylonis" wrote:

> Anthony, Thanks again.  Your results are exactly what I am expecting
> but I am not getting anything close.  I have attached one of your
> codes and a screen capture to show you what I am getting.  My Scan is
> picking up many Mutual Funds as well as stocks.  The mutual funds or
> stocks show no resemblence to 4 crows and an engulfing bar.  Could
> there be a setting somewhere that is acting on the scan that I am not
> aware. I did check the settings in AA but they all seem to apply to
> the Back Tester. Ed PS:  How did you add the pictures to your last
> message?  I added this picture in an Outlook Express email with a copy
> of previous text. Hope it works?    --- In amibroker@xxxxxxxxxxxxxxx,
> Anthony Faragasso <ajf1111@xxxx> wrote:
> > Ed,
> >
> > I set the range 1/1/03 to 2/27/03 for all scans:
> >
> > Scan # 1: Check the image file Ed1.
> >
> > using the code that ends with: And CdBullishEngulfing()AND O < C;
> > There were many buy candidates...I stopped the scan short of
> > completion..but all showed the same pattern as the image.
> >
> > Scan # 2: Check the image file Ed2.
> >
> > using the code that ends with: AND Outside()AND O < C;
> > There were many buy candidates...I stopped the scan short of
> > completion..but all showed the same pattern as the image.
> >
> > Scan # 3: Check the image file Ed3.
> >
> > using the code that ends with: AND O  <  C AND H > Ref(H,-1) AND L <
>
> > Ref(L,-1);
> >
> > There were many buy candidates...I stopped the scan short of
> > completion..but all showed the same pattern as the image.
> >
> >
> > What is it that you are looking for.....or what is your scan
> > returning....send an image
> >
> > Anthony
> > "Edward M. Wylonis " wrote:
> >
> > >  Anthony,
> > >
> > > I am still not getting what I expect.  I was using a Range Setting
> of
> > > 1/1/03 to 2/26/03.  I changed the Range setting to what you were
> > > using "n last quotations" and "n=1" and got the following results:
>
> > >
> > > Scan using Anthony's Range settings
> > > AMRI            Buy      2/27/03      14.89
> > > CPS            Buy      2/27/03      32.75
> > > EAT            Buy      2/27/03      27.58
> > > IGL            Buy      2/27/03      8.74
> > > PNRA            Buy      2/27/03      27.40
> > >
> > > Then I used the first of two suggestions from your last post and
> got
> > > exactly the same results as the previous code.
> > >
> > > I then used your second suggestion and received the following
> results
> > > when I did a scan.  The results were different.
> > >
> > > Scan using Anthony's second suggestion
> > > EAT            Buy      2/27/03      27.58
> > > IRETS            Buy      2/27/03      9.44
> > > PACR            Buy      2/27/03      12.79
> > >
> > > In all cases I am not getting the results that I expect.  When you
> do
> > > a scan using the code you suggested are you getting comparable
> > > results or are you getting 4 black crows and an engulfing white
> > > soldier?
> > >
> > > This seems basic but I am getting frustrated.  I seem to
> understand
> > > my code and your code as well but the results are erroneous.  I'm
> > > still looking for help.
> > >
> > > Thanks again,
> > >
> > > Ed
> > >
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Anthony Faragasso"
> <ajf1111@xxxx>
> > > wrote:
> > > >  Ed,
> > > >
> > > > May I ask as to why your scan is showing dates like 1 / 3 /
> > > 03...what are
> > > > your settings in AA for range....my settings are: n last
> quotations
> > > and n=1.
> > > >
> > > > also, try this:
> > > >
> > > > 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 Outside()AND O < C;//
> AND
> > > H >
> > > > Ref(H,-1) AND L < Ref(L,-1);
> > > > Filter=fourCrows_With_engul > 0;
> > > > Buy=fourCrows_With_engul;
> > > >  Or try this:
> > > >
> > > > 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
> CdBullishEngulfing()AND O
> > > < C;//
> > > > Outside()AND O < C;// AND H > Ref(H,-1) AND L < Ref(L,-1);
> > > > Filter=fourCrows_With_engul > 0;
> > > > Buy=fourCrows_With_engul;
> > > >
> > > > Anthony
> > > > -------Original Message-------
> > > >
> > > > From: amibroker@xxxxxxxxxxxxxxx
> > > > Date: Thursday, February 27, 2003 13:44:13
> > > > To: amibroker@xxxxxxxxxxxxxxx
> > > > Subject: [amibroker] Re: Need help wtih a scan
> > > >
> > > > Anthony,
> > > >
> > > > Thank you for the very quick reply.  I copied your code into the
>
> > > > Automatic Analyzer and and made one change. I did not state
> clearly
> > > > in my description that I was looking for a close greater than
> the
> > > > open on the most current day.  So I changed "O > C" to "C > O".
> > > Then
> > > > I ran a scan and partial results are listed below.  If you just
> > > look
> > > > at any one ticker, say ACE. based on the code I would expect 4
> red
> > > > candlesticks and a green candlestick on 1/3/03 but that is not
> what
> > > I
> > > > see on the chart.  Am I missing something?
> > > >
> > > > Thanks,
> > > >
> > > > Ed
> > > >
> > > > ACE            Buy      1/3/03            30.69
> > > > AERS            Buy      2/7/03            4.84
> > > > AGEN            Buy      2/14/03              9.09
> > > > AKC            Buy      2/21/03              2.09
> > > > ALAB            Buy      2/21/03              43.20
> > > > ALS            Buy      1/3/03            5.58
> > > > OR            Buy      2/14/03              0.52
> > > > APH            Buy      1/3/03            39.80
> > > > ASD            Buy      1/31/03              66.66
> > > > ASPM            Buy      1/3/03            3.62
> > > > ATR            Buy      2/14/03             29.34
> > > > AVM            Buy      1/3/03            4.25
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In amibroker@xxxxxxxxxxxxxxx, Anthony Faragasso
> <ajf1111@xxxx>
> > > > wrote:
> > > > > 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@xxxx
> > > > > > Send SUGGESTIONS to suggest@xxxx
> > > > > > -----------------------------------------
> > > > > > 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.
> > > >
> > > >
> > > > Yahoo! Groups Sponsor
> > > > ADVERTISEMENT
> > > >
> > > >
> > > >
> > > >
> > > > Send BUG REPORTS to bugs@xxxx
> > > > Send SUGGESTIONS to suggest@xxxx
> > > > -----------------------------------------
> > > > 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.
> > >
> > >
> > >
> > >                    Yahoo! Groups Sponsor
> >                         ADVERTISEMENT
> >
> >
> > >
> > > Send BUG REPORTS to bugs@xxxx
> > > Send SUGGESTIONS to suggest@xxxx
> > > -----------------------------------------
> > > 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.
>
>
>                    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.


------------------------ Yahoo! Groups Sponsor ---------------------~-->
Rent DVDs Online-No late fees! Try Netflix for FREE!
http://us.click.yahoo.com/bbvVKB/oEZFAA/46VHAA/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/