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

Re: [amibroker] Simple Moving Average



PureBytes Links

Trading Reference Links

Chris,

You will need the foreign statement. Either SetForeign as in example below
using the S&P500 or just:

XJO = Foreign("XJO","Close");

----------
SetForeign("^SPX",True,False);
SP = Close;
CRT = EMA(SP,5)/EMA(SP,65);
RestorePriceArrays();

Terry
--

> Hi everybody:
> 
> I am beginning to put together some ideas that I would like to backtest.
> 
> My first criteria would that an index such as the XJO (ASX top 200) should
> close higher than yesterday. How would I reference the XJO in my buy
> condition? Do I have to the XJO as a base index?
> 
> My initial effort needs help:
> 
> Cond1 = XJO > Ref( XJO, -1); // or do I use the Foreign function?
> 
> Cond2 = Cross(C, EMA(C,30));
> 
> Buy= Cond1 AND Cond2;
> 
> Sell= Cross( EMA(C, 10), C);
> 
> Any and all help appreciated.
> 
> Regards.
> 
> 
> 
> ChrisB
> 
> 
> 
> Cheers
> 
> Chris
> kris45mar@xxxxxxxxx



------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/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/