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

Re: [amibroker] Re: Scanning for stocks not conditions...



PureBytes Links

Trading Reference Links

Hello,

I think that Dimitris's code does exactly what John wanted to do.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "dtsokakis" <TSOKAKIS@xxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Tuesday, July 16, 2002 1:12 PM
Subject: [amibroker] Re: Scanning for stocks not conditions...


> Anthony,
> John question is not quite clear for me.
> John wrote:
> "I'm trying to Scan/Explore for stocks whose previous 10 day range is 
> greater than some particular value. This is easy to do in Explore 
> mode but the output consists of multiple occurences of the same 
> stock. 
> Really, I don't want a list of all the occurences of when the 
> stock's range is greater than the value... I REALLY just want the 
> ticker symbol inserted into the list and then the scan should move on 
> to the next symbol."
> 
> If you explore for n=1 last quotation, you will find stocks with 
> CONDITION=TRUE
> only for the last bar. If for some stock condition was true 5 bars 
> ago, you will miss it.
> This is why I proposed
> 
> COND=...;//your condition here
> x=10;//the days you will search
> Filter=Sum(COND,x)>=1;
> AddColumn(C,"");//add any informative columns
> Set n last quotations n=1 and explore.
> 
> to explore the last x bars and meet the second requirement of one 
> ticker appearence in the result list.
> DT
> --- In amibroker@xxxx, Anthony Faragasso <ajf1111@xxxx> wrote:
> > Dimitri,
> > 
> > Exactly my question... , Without knowing what John wanted to 
> explore, (
> > No formula was posted ) I presumed he was doing a generic explore.
> > 
> > If suppose he is exploring for a condition to be true.Set n last
> > quotations and n=1, click explore.
> > 
> > example:
> > 
> > //Consolidation Breakouts
> > 
> > pds=80;
> > Volpds=60;
> > CongestionIndex=((HHV(C,pds)-LLV(C,pds))/LLV(C,pds))*100;
> > 
> > // Consolidation breakout (upside)
> > 
> > brkup=IIf(Ref(congestionindex,-5)<10 AND IIf(congestionindex >=10 
> AND
> > IIf(Close>Ref(HHV(C,pds),-5) AND
> > IIf(MA(V,5)>=1.5*(Ref(MA(V,Volpds),-5)), 1,0),1,0),1,0),1,0) ;
> > 
> > brkdown=IIf(Ref(congestionindex,-5)<10 AND IIf(congestionindex >=10 
> AND
> > IIf(Close<Ref(LLV(C,pds),-5)AND
> > IIf(MA(V,5)>=1.5*(Ref(MA(V,Volpds),-5)),1,0),1,0),1,0),1,0);
> > 
> > Filter=brkup OR brkdown;
> > 
> > AddColumn(brkup,"Upside");
> > AddColumn(brkdown,"Downside");
> > 
> > /**************************************************/
> > 
> > Anthony
> > 
> > dtsokakis wrote:
> > 
> > > John,
> > > What is the exact condition you want to explore ?
> > > DT
> > > --- In amibroker@xxxx, John Nelson <trader@xxxx> wrote:
> > > >
> > > > Right but this has the disadvantage of putting the search range
> > > into the
> > > > program code. Also it doesn't look like you can do this easily 
> for
> > > an
> > > > interval within the price vector... only from the last day back.
> > > Oh
> > > > well, something we just have to live with I guess.
> > > >
> > > > -- John
> > > >
> > > > dtsokakis wrote:
> > > >
> > > > >John,
> > > > >Suppose your want to search a condition COND for the last x 
> days.
> > > > >You may use the exploration
> > > > >
> > > > >COND=C>Ref(C,-1);//your condition here
> > > > >x=10;//the days you will search
> > > > >Filter=Sum(COND,x)>=1;
> > > > >AddColumn(C,"");//add any informative columns
> > > > >
> > > > >Set n last quotations n=1 and explore.
> > > > >You will not see when COND was true, but each ticker will 
> appear
> > > only
> > > > >once in your result list.
> > > > >Dimitris Tsokakis
> > > > >
> > > > >
> > > >
> > > >
> > > > --
> > > > _____________________________________________________
> > > >
> > > > John T. Nelson
> > > > Trader | Dreams Of Empire
> > > > mail: | trader@xxxx
> > > > web: | http://www.dreamsofempire.com/
> > > > _____________________________________________________
> > > > "Prediction is sexy... but strategy makes money"
> > >
> > >
> > > Yahoo! Groups Sponsor
> > [Image]
> > Click here to find your contact lenses!
> > >
> > > Your use of Yahoo! Groups is subject to the Yahoo! Terms of 
> Service.
> 
> 
> 
> 
> 
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/ 
> 
> 
>