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

[amibroker] Re: How to BUY a FOREIGN?



PureBytes Links

Trading Reference Links

Terry,
thanks a lot for your suggestions, which I all tried or checked. I 
think I am exprienced in backtesting, its settings, filters and 
stuff. Sometimes it happens I overlook small but important details. 
>:-)

I think the concept of reading all symbols of a market or a watchlist 
as mentioned in the first place and taken from the help-section 
(chapter CATEEGORYGERSYMBOLS) is not useful in combination with a 
filter.

Correct me when I am wrong, but that loop will be processed for every 
symbol in the filter, while it would be necessary only one time. Its 
using that much processing time and cpu-resources its close to 
freeze. And there is also no satisfying result. So I hard-coded for 
every symbol:

IF (NAME()=="xyz"" ...action...;

As the watchlist consists of the current stock that is in DJ-INDU its 
almost static. This way its much faster and delivers the results that 
I expected. Took me a long time to find out. 

enzo

 --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> wrote:
>
> Tradeprice = True means to replace the BuyPrice, SellPrice, etc. 
with
> those of the Foreign symbol.
> 
> You still must have the symbol selected or available in a filter
> Watchlist or use "all symbols" in order to get it to trade.
> 
> Did you try my second suggestion? That clearly works for me 
(provided
> it's available in the list of stocks you are testing...what I just 
about
> using "filter" or "all symbols")
> 
> --
> Terry
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] 
On
> Behalf Of herrfrechdax
> Sent: Friday, July 07, 2006 02:05
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: [amibroker] Re: How to BUY a FOREIGN?
> 
> Hi Terry,
> 
> no it is not working that way either. Those parameters have a 
> different meaning (fixup, tradeprice).
> 
> enzo
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@> 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
> >
> 
> 
> 
> 
> 
> 
> 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
>