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

[amibroker] Apply Stop



PureBytes Links

Trading Reference Links

Hi
 
I have one trading system that contains two entries. The name of the first one is A, the name of the second one is B. 
 
I would like to exit A when a 4.5% profit is reached, and exit B when a 2.0% profit is reached.
 
Here's the formula I use.

Buy = A OR B;

Sell = IIf(B, ApplyStop( 1, 1, 4.5, True), IIf(A, ApplyStop( 1, 1, 2, True), 0));

Unfortunately, this formula doesn't work.  The exit always happens when a 4.5% profit is reached, whatever the entry is (A or B).

Could someone tells me the correct formula or where I can find info in order to resolve this problem ?

Thanks a lot

Claude Marc-Aurčle



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





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS