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

[amibroker] Re: PAIRS problems


  • Date: Mon, 30 Nov 2009 17:43:07 -0000
  • From: "chapman49682" <chapman49682@xxxxxxxxx>
  • Subject: [amibroker] Re: PAIRS problems

PureBytes Links

Trading Reference Links

Excellent!  Thank you Mike; I'll give it a try.

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> 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
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "chapman49682" <chapman49682@>
> wrote:
> >
> > hi folks,
> >
> > I need help.
> >
> > I've been experimenting with trading pairs lately, and have been able
> test pairs trading systems on 20 pairs using "Optimize" on a variable I
> call PairNum, specifying each pair thusly:
> >
> > if ( PairNum == 1 )
> > {
> > data1 = "SNDK" ;
> > data2 = "QCOM" ;
> > }
> >
> > (etc.)
> >
> > This works well for backtesting, giving me a good idea how each pair
> performs with the system through time. The Optimize command cycles
> through each of the 20 pairs I follow, and gives me 20 lines of backtest
> results.
> >
> > The problem I'm having is coming up with a way to "Explore" for
> buy/sell/short/cover signals for all 20 pairs on a day-to-day basis.
> >
> > It's easy to "Explore" for signals for one pair, but I really don't
> want to "Explore" 20 times, specifying a different pair though the
> method above, but using "Param" in place of "Optimize".
> >
> > Is there a way to cycle through these symbol pairs for daily signals?
> I want to be able to generate a daily list of signals for each of the 20
> pairs.
> >
> > I spent a good part of the weekend trying to find a way to do it
> ("WHILE" statements, "FOR" statements, lists, etc. but I was
> unsuccessful.
> >
> > It's likely that either I'm missing something obvious, or that it's
> beyond my current level of programming skill. Any ideas?
> >
> > thanks...
> >
>




------------------------------------

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