Each variable to same variable in composite
Here is a method to do this
Just remember to check the pad to an index in the AA settings or else if a
particular symbol does not have data for a date it will not give you results
and you will get many jumps in values
buy=0;
if(inwatchlist(1))
{
sym = "~BestChoices";
AddToComposite( O,sym, "O" );
AddToComposite( H,sym, "H" );
AddToComposite( L,sym, "L" );
AddToComposite( C,sym, "C" );
AddToComposite( V,sym, "V" );
}
if(inwatchlist(4))
{
sym = "~ScoreCard";
AddToComposite( O,sym, "O" );
AddToComposite( H,sym, "H" );
AddToComposite( L,sym, "L" );
AddToComposite( C,sym, "C" );
AddToComposite( V,sym, "V" );
}
--
Cheers
Graham
AB-Write >< Professional AFL Writing Service
Yes, I write AFL code to your requirements
http://www.aflwriting.com
On 30/11/06, Don Lindberg <[EMAIL PROTECTED]> wrote:
I have copied an AFL script from Hermans ATC tutorial that allow me
to create composites of multiple watchlists at one time. Code pasted
below:
Var=Close;
Var2=Open;
Var3=High;
Var4=Low;
Var5=Volume;
AddToComposite( InWatchList( 1 ) * (Var),"~BestChoices", "X" );
AddToComposite( InWatchList( 4 ) * (Var),"~ScoreCard", "X" );
Buy=Sell=Short=Cover=0;
Filter=1;
This code works fine with just the single variable Var, but I want my
composites to include all 5 variables. How do I change the code to
accept more tha a single variable?
Any help would be greatly appreciated.
Don Lindberg
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links