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

Re: [amibroker] FOREIGN function??



PureBytes Links

Trading Reference Links

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?

EG:

*** DO CONDITIONS GO HERE?? (A) ***
Buycondition  = ....
Sellcondition = ....
ShortCondition = ....
CoverCondition = ....

if( Name() == "EURUSD" )
{
     // your trading rules for EURUSD

     *** OR HERE (B) ****	
     Buycondition = ...
     Sellcondition = ....

     Buy = Buycondition AND ..
     Sell = ....	

}
else
{
     SetForeign("EURUSD");

     // here your trading rules for OTHER pair
     // based on signals generated from EURUSD (hence SetForeign)

     *** AND HERE??? (B) ***
     Shortcondition = ....
     Covercondition = ....

     Short = Shortcondition AND ...
     Cover = ....

     RestorePriceArrays();
}

I hope I've articulated this properly because I get varying results 
depending on where the test condtions are placed.

Thanks,
Andrew.



------------------------ 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/