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

[amibroker] How to BUY a FOREIGN?



PureBytes Links

Trading Reference Links

i am getting nuts... i am unable to backtest a strategy that buys 
certain symbols of watchlist. 

following simple example of a loop through the symbols of a 
watchlist I found in AL library. Will someone please fill in the 
code to buy the ticker. It is so appreciatetd! Thanks in advance. 
enzo

listNum=0 ;//enter watchlist number
list = GetCategorySymbols( categoryWatchlist, listnum );
for( j = 0; ( item = StrExtract( list, j ) ) != ""; j++ )
{
SetForeign(item);


//BUY=1; // will only buy first symbol of the watchlist


RestorePriceArrays();// to get out the influence of SetForeign
}