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

Re: [amibroker] Re: Trouble trying to compare industry and market ...



PureBytes Links

Trading Reference Links

> So there is no way to make the market automatic for each symbol? (e.g.  for MSFT it would be NASDAQ and for AA NYSE)?
 
Louis - Here is the code to automatically select the market. You will probably need to tweak it -
1. replace index ticker with the ticker used by your data provider
2. I don't know what numbers are assigned to your markets, so you may need to switch the numbers ( 1, 2, 3 ) around...

if ( MarketID() == 1 )

MarketIDX = "!NYA";

else if ( MarketID() == 2 )

MarketIDX = "!XAX";

else if ( MarketID() == 3 )

MarketIDX = "!COMP";

else

MarketIDX = "SPX";

SetForeign( MarketIDX );

Plot( Close, MarketIDX, colorBlack, styleCandle );

RestorePriceArrays();

__._,_.___

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 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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___