Thank you very much Anthony; you've been very kind.

--- In [email protected], "Anthony Faragasso" <ajf1...@...> wrote:
>
> /*First Scan:
> 
> //Advance/Decline Issues - Watchlist 0
> 
> Filter=InWatchList(0);
> 
> AddToComposite(C>Ref(C,-1),"~Adv0","X");
> 
> AddToComposite(C<Ref(C,-1),"~Dec0","X");
> 
> Buy=Sell=Short=Cover=0;
> 
> Second Scan:
> 
> //Advance/Decline Issues - Watchlist 1
> 
> Filter=InWatchList(1);
> 
> AddToComposite(C>Ref(C,-1),"~Adv1","X");
> 
> AddToComposite(C<Ref(C,-1),"~Dec1","X");
> 
> Buy=Sell=Short=Cover=0;*/
> 
> if(InWatchList(0))
> 
> {
> 
> AddToComposite(C>Ref(C,-1),"~Adv0","X");
> 
> AddToComposite(C<Ref(C,-1),"~Dec0","X");
> 
> Buy=0;
> 
> }
> 
> if(InWatchList(1))
> 
> {
> 
> AddToComposite(C>Ref(C,-1),"~Adv1","X");
> 
> AddToComposite(C<Ref(C,-1),"~Dec1","X");
> 
> Buy=0;
> 
> }
> 
> 
> 
> I commented out your original formula and added the above...click on SCAN to 
> run the above
> 
> formula....the composites are stored in Group 253
> 
>   ----- Original Message ----- 
>   From: prudenttrader1 
>   To: [email protected] 
>   Sent: Wednesday, July 28, 2010 10:08 AM
>   Subject: [amibroker] Combining two or more scans with different filters 
> within a code.
> 
> 
>     
>   Hi,
> 
>   Does anybody know how to combine the following two scans within a code so 
> that the scan is run only once?
> 
>   First Scan:
>   //Advance/Decline Issues - Watchlist 0
>   Filter=InWatchList(0);
>   AddToComposite(C>Ref(C,-1),"~Adv0","X");
>   AddToComposite(C<Ref(C,-1),"~Dec0","X");
>   Buy=Sell=Short=Cover=0;
> 
>   Second Scan:
>   //Advance/Decline Issues - Watchlist 1
>   Filter=InWatchList(1);
>   AddToComposite(C>Ref(C,-1),"~Adv1","X");
>   AddToComposite(C<Ref(C,-1),"~Dec1","X");
>   Buy=Sell=Short=Cover=0;
> 
>   Thank you very much for your help.
>


Reply via email to