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

Re: [amibroker] Conditionally changing the Foreign Symbol to be plotted.



PureBytes Links

Trading Reference Links

hi MM,
 
the symbol in your active chart can be put in a string using:
 
activeSymbol = Name();
 
you can extract the first few characters from this string using StrMid()  (see help file).
 
So:
 
subActiveSymbol = StrMid(activeSymbol,0,3);
 
rgds, Ed
 
 
 
 
----- Original Message -----
Sent: Friday, September 05, 2008 5:05 AM
Subject: [amibroker] Conditionally changing the Foreign Symbol to be plotted.

Hi,

I create a number of ATCs for the general market, the Nasdaq, S&P 500,
and the Russell.

In my window I have two charts. The top chart is a line plot of my ATC
that I have selected. The bottom chart is a foreign plot of either
SP500, RUT, NDX, INDU or whatever I select in the parameters window.

What I would like to do is have some code to recognize which type of
ATC I have selected and plot the appropriate market for it in the
bottom pane.

For example all of my NDX ATCs start with ~NDX. And all of my SP500
ATCs start with ~SP5.

Is there a way I can extract the first 3 or 4 characters of the
selected symbol and run it through a CASE or IF - THEN branch?

Regards,

MM

__._,_.___

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

__,_._,___