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

RE: [amibroker] FOREIGN function??



PureBytes Links

Trading Reference Links

Just to add to this answer...

You have a two symbol watchlist and have selected "use Filter" to run
the backtest so it is looking at ONLY your two currency pairs. 

The first conditional says IF your SYMBOL is "EURUSD" then Buy it on
these conditions,

ELSE (if the symbol to be traded is NOT "EURUSD" it is, therefore, the
only other choice in your 2 symbol list).

Now, using the foreign symbol "EURUSD" figure out what to do and trade
this other symbol.

Hope that helps.
--
Terry

-----Original Message-----
From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
Behalf Of Tomasz Janeczko
Sent: Monday, November 14, 2005 06:29
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] FOREIGN function??

> ** Does the system interpret this as BUY OTHER pair if the MA(C,6) 
> crosses the MA(C,24) on the EURUSD? Or am I looking at this all wrong?

Yes. Exactly.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message ----- 
From: "Andrew Z" <wizard@xxxxxxxxxxxxxxx>
To: <amibroker@xxxxxxxxxxxxxxx>
Sent: Monday, November 14, 2005 2:20 PM
Subject: Re: [amibroker] FOREIGN function??


> Thanks Tomasz.
> 
> There is one thing I do not understand though. If I have trading rules

> in the second part (below SETFOREIGN) how does the system interpret
it. 
> For example:
> .....
> 
> else
> {
>   SetForeign("EURUSD");
>   Buy = Cross (MA(C,6), MA(C,24));  **
>   Sell = Cross (MA(C,24), MA(C,6));
> 
>   RestorePriceArrays();
> }
> 
> ** Does the system interpret this as BUY OTHER pair if the MA(C,6) 
> crosses the MA(C,24) on the EURUSD? Or am I looking at this all wrong?
> 
> Sorry, just trying to get my head around this??
> 
> Thanks,
> Andrew
> 
> Tomasz Janeczko wrote:
>> Hello,
>> 
>> You have to create a watch list consisting of BOTH pairs.
>> Then write code like that:
>> 
>> if( Name() == "EURUSD" )
>> {
>>     // your trading rules for EURUSD
>> 
>> }
>> else
>> {
>>     SetForeign("EURUSD");
>> 
>>     // here your trading rules for OTHER pair
>>     // based on signals generated from EURUSD (hence SetForeign)
>> 
>> 
>>     RestorePriceArrays();
>> }
> 
> 
> 
> 
> 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
> 
> 
> 
> 
> 
> 
>



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/