PureBytes Links
Trading Reference Links
|
Mike,
I tried it and it worked great. The only change I had to make was to create each pair twice with the symbols reversed i.e.
case "SNDK": data2 = "QCOM"; break;
case "QCOM": data2 = "SNDK"; break;
case "ORCL": data2 = "IBM"; break;
case "IBM": data2 = "ORCL"; break;
This showed me both sides of the trade for each pair.
Thanks again for your elegant solution.
--- In amibroker@xxxxxxxxxxxxxxx, "chapman49682" <chapman49682@xxx> wrote:
>
> Excellent! Thank you Mike; I'll give it a try.
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@> wrote:
> >
> >
> > The following can be used for both scenarios (i.e. don't need Optimize
> > statement). Just run on the complete watchlist. First symbol of each
> > pair will cause data2 to be set and logic executed. When processing
> > second symbol of each pair, data2 will be set to empty string and logic
> > will not be executed.
> >
> > data1 = Name();
> >
> > switch (data1) {
> > case "SNDK": data2 = "QCOM"; break;
> > case "ORCL": data2 = "IBM"; break;
> > case "MSFT": data2 = "AAPL"; break;
> > default: data2 = ""; break;
> > }
> >
> > Filter = StrLen(data2);
> >
> > AddColumn(Close, "Price");
> >
> > Mike
> >
> >
------------------------------------
**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.
TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com
TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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:
amibroker-digest@xxxxxxxxxxxxxxx
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/
|