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

[amibroker] Re: Rotating Funds in system



PureBytes Links

Trading Reference Links


--- In amibroker@xxxxxxxxxxxxxxx, "msc626" <msc626@xxxx> wrote:
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "areehoi" <hoierman@xxxx> wrote:
> > 
> > I have two funds ProFund USPIX (a short fund) and UOPIX (a long fund) 
> > Both are long fund but one can switch from long to short or visa 
> > versa depending on ones systems signals. I've used the QQQQ's to get 
> > a signal then switched accordingly. Is there a a way one could set up 
> > in the Backtester so it would give you the long shot signals based on 
> > the fund rather than the QQQQ's?  Any suggestions on this will be 
> > appreciated.
> > 
> > Dick H.
> 
> SetForeign(^NDX,True); //I like to use Nas100 instead of QQQQ
> Buy=Your code;
> Sell=Your code;
> Short=Your Code:
> Cover=Your code;
> 
> RestorePriceArrays(True);
> 
> //Buy Sell ProFunds Funds
> Buy=(myBuy AND Name()=="UOPIX") OR 
>     (myShort AND Name()=="USPIX");
> Sell=(mySell AND Name()=="UOPIX") OR
>      (myCover AND Name()=="USPIX");
> 
> Run this on a a watch list with these only these two funds in it for
> fastest operation and backtesting, although it will work on your
> entire database of stocks/funds--but much slower.
> 
> dale b

Sorry, it should read:

SetForeign(^NDX,True); //I like to use Nas100 instead of QQQQ
myBuy=Your code;
mySell=Your code;
myShort=Your Code:
myCover=Your code;
 
 RestorePriceArrays(True);
 
 //Buy Sell ProFunds Funds
 Buy=(myBuy AND Name()=="UOPIX") OR 
     (myShort AND Name()=="USPIX");
 Sell=(mySell AND Name()=="UOPIX") OR
      (myCover AND Name()=="USPIX");

dale b





------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

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