PureBytes Links
Trading Reference Links
|
I agree with Graham to use SetForeign, do your calcs and Restore since
your BASE is just the CLOSE and does not contain O,H or L data.
However, you can also save OHL if you wish
BASE_O = Foreign("^IXIC","O",1);
BASE_H = Foreign("^IXIC","H",1);
BASE_L = Foreign("^IXIC","L",1);
--
Terry
| -----Original Message-----
| From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
| Behalf Of Graham
| Sent: Sunday, August 28, 2005 18:11
| To: amibroker@xxxxxxxxxxxxxxx
| Subject: Re: [amibroker] Question on nuance of Foreign and SetForeign.
|
| best to put your formula relating to the foreign within the
| setforeign/restorpricearrays
| statements
|
| On 8/29/05, sebastiandanconia <sebastiandanconia@xxxxxxxxx> wrote:
| > I'm (attempting) to run a backtest against other securities using
| > signals generated from ^IXIC.
| >
| > Example code:
| >
| > BASE=Foreign("^IXIC","C",1);
| >
| > Cond1=Cum(1)>21 AND Cross(BASE,(LLV(BASE,20)+(ATR(10)*3)));
| > Cond2=Cum(1)>21 AND Cross((HHV(BASE,20)-(ATR(10)*3)),BASE);
| >
| > Question: How do I make sure the ATR is calculated from BASE and
| not
| > the security? Is this the kind of issue for which SetForeign is
| > used? I've looked at the "Help" on this, but it's not clear to me.
| >
| > TIA for any guidance on this.
| >
| >
| > Luck to all,
| >
| > Sebastian
| >
| >
| >
| >
| >
| >
| >
| > Please note that this group is for discussion between users only.
| >
| > To get support from AmiBroker please send an e-mail directly to
| > SUPPORT {at} amibroker.com
| >
| > For other support material please check also:
| > http://www.amibroker.com/support.html
| >
| >
| > Yahoo! Groups Links
| >
| >
| >
| >
| >
| >
| >
| >
|
|
| --
| Cheers
| Graham
| AB-Write >< Professional AFL Writing Service
| Yes, I write AFL code to your requirements
| http://e-wire.net.au/~eb_kavan/ab_write.htm
|
|
| ------------------------ Yahoo! Groups Sponsor --------------------~--
| >
| Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home
| page
| http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/GHeqlB/TM
| --------------------------------------------------------------------~-
| >
|
| Please note that this group is for discussion between users only.
|
| To get support from AmiBroker please send an e-mail directly to
| SUPPORT {at} amibroker.com
|
| For other support material please check also:
| http://www.amibroker.com/support.html
|
|
| Yahoo! Groups Links
|
|
|
|
|
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get fast access to your favorite Yahoo! Groups. Make Yahoo! your home page
http://us.click.yahoo.com/dpRU5A/wUILAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~->
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.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/
|