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

[amibroker] Re: How to BUY a FOREIGN?



PureBytes Links

Trading Reference Links

Hi Terry,

no it is not working that way either. Those parameters have a 
different meaning (fixup, tradeprice).

enzo



--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> wrote:
>
> Just modify the last line:
> SetForeign(item,True,True);
> 
> 2nd argument True or False at your discretion.
> 3rd argument True changes tradeprices too.
> 
> If by chance that does not work then do this:
> 
> Buy = True AND Name() == item;
> 
> 
> In both cases, make sure you have "filter" checked are filtering on 
the
> same Watchlist otherwise it can't find the stock. 
> --
> Terry
> 
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On
> Behalf Of herrfrechdax
> Sent: Tuesday, July 04, 2006 10:21
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] How to BUY a FOREIGN?
> 
> 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
> }
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 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 other support material please check also:
> http://www.amibroker.com/support.html
> 
>  
> Yahoo! Groups Links
>