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

RE: [amibroker] Re: FOREIGN function??



PureBytes Links

Trading Reference Links

Andrew,

Your first part requires EURUSD because of the Name() ==, in the second
part you use Foreign to access EURUSD. So, to put it outside the loop,
you must use Foreign to first store the EURUSD, then perform your
conditions on it. Inside the loop, in both parts, test to these
conditions.

--
Terry
-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of wizard_inetsys
Sent: Tuesday, November 15, 2005 22:12
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Re: FOREIGN function??

Hi Terry,

The conditions are the same for both parts of the IF statement. I am
using the SETFOREIGN function in the second part so I can reference
the signals from the first part. However, I get vastly different
results when I define the conditions first (outside the IF statement),
as opposed to defining the same conditions in each part of the IF
statement.

I'll have to plot both and compare buy/sells, but in just looking at
the backtest results I get complementing LONG/SHORT in my chosen pairs
when the conditions are defined WITHIN both parts of the IF statement,
which is what I would expect. Defining the conditions first does not
give me the same results. I could have many trades on EURUSD before
any are taken on the other pair, which is NOT what I would expect.

Thank you for your help in this matter,
Andrew.

--- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxxx> wrote:
>
> If the conditions are identical for both parts of the IF statement,
then
> defining them first is fine. If the condition is dependent on "URUSD"
> you still need the foreign statement to be sure that is the symbol you
> are using. This is because you don't have a "selected" symbol so you
> must specify the symbol with foreign (or SetForeign).
> 
> --
> Terry
> -----Original Message-----
> From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> Behalf Of Andrew Z
> Sent: Tuesday, November 15, 2005 03:22
> To: amibroker@xxxxxxxxxxxxxxx
> Subject: Re: [amibroker] FOREIGN function??
> 
> G'day all,
> 
> I do have a query. When declaring buy/sell/short/cover conditions that

> will form part of the buy/sell/short/cover statements, is it correct
to 
> simply declare these conditions BEFORE the IF statement or must they
be 
> declared with both sets of trading rules?






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 --------------------~--> 
Try Online Currency Trading with GFT. Free 50K Demo. Trade 
24 Hours. Commission-Free. 
http://us.click.yahoo.com/RvFikB/9M2KAA/U1CZAA/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/