Thanks Mike, i will check that and try to solve it can you please give me an outline to do so. thanks cheers
Mike writes: > Hi, > > The AddToComposites function is intended for exactly this scenario. > > http://www.amibroker.com/guide/a_addtocomposite.html > > Note that the documentation is out of date here. You should use the > Plot command if you want to show the results on a chart. > > Mike > > --- In [email protected], "Waleed Khalil" <[EMAIL PROTECTED]> > wrote: >> >> >> can anyone please one tell me what is wrong with the code below. >> i need to get the number of stocks above there 20 MA. >> >> WatchlistNumber=0; >> function CountTickers( Listnum ) >> { >> list = GetCategorySymbols( categoryWatchlist , listnum ) ; >> >> for( i = 0; ( sym = StrExtract( list, i ) ) != ""; i++ ) >> w=0; >> Count=IIf(Foreign(sym,"Close") > >> MA(Foreign(sym,"Close"),20),w+1,w); >> { >> if( i == 0 ) i = 0; >> else i = i ; >> } >> >> return Count; >> } >> >> totalissue=CountTickers( WatchlistNumber); >> Plot( totalissue, _DEFAULT_NAME(),ParamColor("Up Color", >> colorBlack ), ParamStyle( "Style", styleThick) ); >> >> printf("totalissue:" + totalissue ); >> >> thanks in advance >> Waleed >> -------------------------------------------------------------------- > --------------------------------------------------- >> Send big files for free. Simple steps. No registration. >> Visit now http://www.nawelny.com >> > > ----------------------------------------------------------------------------------------------------------------------- Send big files for free. Simple steps. No registration. Visit now http://www.nawelny.com
