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

[amibroker] AddToComposite



PureBytes Links

Trading Reference Links

I tried to create a composite by using following ATC formula and run a 
scan against a watchlist but I get price chart of the 'first symbol' 
on the list & not the composite value of the watchlist.what change is 
needed to get a composite, the formula is as following.

/* AddToComposite statements are for Automatic Analysis -> Scan */
/* add Close price to our index OHLC fields */
AddToComposite(Close, "~MyIndex", "X" );
/* add one to open intest field (we use this field as a counter) */
AddToComposite( 1, "~MyIndex", "I" );
Buy = 0; // required by scan mode
/* this part is for Indicator Builder */
Graph0 = Foreign( "~MyIndex", "C" )/Foreign( "~MyIndex", I" );

any help would be appreciated.

thanks
Osgem