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

[amibroker] Re: scrolling through a watchlist



PureBytes Links

Trading Reference Links

I an not sure what you are looking for. This program runs through a 
watch list and processes the the symbols individually. You can do all 
sorts of things within SetForeign() and RestorePriceArrays();

Barry

_SECTION_BEGIN("Using SetForeign");  
SetChartOptions(0, chartShowArrows | chartShowDates ); 
Filename = StrLeft(_DEFAULT_NAME(),StrLen(_DEFAULT_NAME())-2);
_N(Title = filename + StrFormat(" - {{DATE}} {{VALUES}} "));

// parameters

Watchlist = 10; 

// create comma separated list of symbols in the watch list 
list = CategoryGetSymbols( categoryWatchlist, watchlist ); 

/*
this gets the symbol name and the for loop will process every one in 
the watch list for each bar. In an auto trading program it will run 
every time a tick is received
*/

for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) 
{ 
	SetForeign(sym); // switches to the symbol array, OHLCVOi
/* 
put your code here. You can create an include that will define the 
parameters for each symbol you have optimized and dynamically switch 
the parameters for the indicators. You can also dynamically switch to 
a different system for some symbols. Your imagination is the limit.
*/
	RestorePriceArrays( ); 
} 
_SECTION_END();

--- In amibroker@xxxxxxxxxxxxxxx, jim fenster <normanjade@xxx> wrote:
>
> If you have a code that works on two symbols, is it possible call 
upon the first and second tickers in the watchlist without having to 
actually manually write the tickers? Like referring to them as 1st 
and 2nd ticker in this specific watchlist. possible?
>



------------------------------------

**** IMPORTANT ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

*********************
TO GET TECHNICAL 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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/