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

[amibroker] Re: Fund Rotation and Foreign


  • Date: Tue, 09 Feb 2010 21:45:38 -0000
  • From: "bistrader" <bistrader@xxxxxxxxx>
  • Subject: [amibroker] Re: Fund Rotation and Foreign

PureBytes Links

Trading Reference Links

Lets see ...

1. Place all to select from in watchlist.
2. Use filter and select this watchlist.
3. Use SetOption to set MaxOpenPositions to 3 and not just worstrankheld. So, will pick 3 top only.
4. Decide when you want to rotate as yours is set so can happen any market day which might be what you want.
5.  Count just set PositionSize = -100 / GetOption("MaxOpenPositions") or take a look at Boiler Plate afl from AmiBrokeru.com free downloads.
6. Not sure what you are doing with PositionScore as it appears to be kind of a True or False condition with your AND.  The less than sign is a problem as well.  Maybe you are looking for ...
PositionScore = IIf( j>MA(j,10), C/Ref(C,-6), 0);

--- In amibroker@xxxxxxxxxxxxxxx, "Steve_Almond" <me@xxx> wrote:
>
> I'm able to use the backtester for Fund rotation (and I understand the use of 'Foreign' symbols.
> I cannot seem to combine the two, though.
> 
> I want to invest in 3 funds from a group of 10 using the best 6 month return to select the top 3. I use PositionScore =  C/Ref(C,-6);
> 
> BUT, I only want to invest in those funds if the ETF SPY is above its 10 month MA.
> 
> Can anyone suggest how to accomplish this?
> 
> Below is my attempt. It correctly invests only when SPY is above its 10 month MA, but ALWAYS selects the first 3 funds in the list.
> 
> Steve
> 
> EnableRotationalTrading(); 
> SetOption("WorstRankHeld",3); 
> 
> j=Foreign("SPY","C");
> PositionSize = -100/3;
> PositionScore =  C/Ref(C,-6)AND  j>MA(j,10);
>




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

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