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

[amibroker] Re: Long and Inverse Fund



PureBytes Links

Trading Reference Links


Ken - do this then retry

File / Database settings / Flush cache
Configure / Retrieve symbols
Close / OK


--- In amibroker@xxxxxxxxxxxxxxx, "Ken Close" <closeks@xxxx> wrote:
> Chuck:
> 
> Nice to hear from you.  
> 
> I have tried everything and just had a clue:
> 
> I put in the following code which Bert Steele suggested many 
messages
> ago:
> 
> =================================================
> // test name2. afl
> 
> SetForeign("BRSIX");
> Cond1 = C >= EMA(C, 21) ;
> RestorePriceArrays();
> //Buy = Sell = Short = Cover = 0;
> Buy = (Cond1 == True AND Name() == "BRSIX") OR (Cond1 == False AND
> Name() == "POSSX");
> Sell = (Cond1 == False AND Name() == "BRSIX") OR (Cond1 == True AND
> Name() == "POSSX");
> Short = 0; //Not shorting anything
> Cover = 0;
> Filter = Buy OR Sell;
> AddColumn(C,"Close", 1.2);
> AddColumn (Cond1, "Cond1",1.0);
> AddColumn (Buy, "POSSX to BRSIX", 1, colorDefault, IIf(Buy, 
colorGreen,
> colorDefault));
> AddColumn (Sell, "BRSIX to POSSX", 1, colorDefault, IIf
(Sell,colorRed,
> colorDefault));
> ===============================================
> 
> This worked with BRSIX and POSSX alternating in the trade list.
> 
> I then substituted my "long" and "inverse" funds, which are really 
FNU
> files produced within the FastTrack context (really just txt files 
with
> dates and closing prices).
> 
> In the exact same code as above, I only see my "long" fund (FNU 
file)
> displayed in the Trade list.  I even changed the SetForeign 
statement to
> name my "long" FNU file.
> 
> Since I use these "long" and "inverse" FNU files for all sorts of 
other
> stuff, and they work ok there, I am truly puzzled why they seem to 
cause
> the above code to operate incorrectly.
> 
> The above code seems to work ok whether Long only or Long and Short 
is
> set in the Settings box.
> 
> Any ideas?
> 
> Ken






------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/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/