PureBytes Links
Trading Reference Links
|
Graham
In the event that there are subsequent buy signals after entry, is
there any way to "ignore" them?
Thanks
Larry
--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> Applystop works differently fomr nrmal sell condtions as it does
not give a
> yes/no answer bt controls the trade exits directly
>
> provided you do not get any additional buy signals before an exit
occurs the
> code below should give you what you want. Any subsequent buy
signals after
> entry will reset the conditions, you will need to use loops to
define the
> exits and not use applystop at all.
>
> buy = A or B;
> condA = valuewhen( buy, A );
> condB = valuewhen( buy, B );
>
> *Sell* = 0;
> If(CondB) ApplyStop( 1, 1, 4.5, *True*);
> If(condA) ApplyStop( 1, 1, 2, *True*);
>
>
> --
> 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
>
>
> On 3/1/06, lapilia <lapilia@xxx> wrote:
> >
> > 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<http://groups.yahoo.com/gads?
t=ms&k=Investment+management+software&w1=Investment+management+softwar
e&w2=Real+estate+investment+software&w3=Investment+property+software&w
4=Software+support&w5=Real+estate+investment+analysis+software&w6=Inve
stment+software&c=6&s=200&.sig=_XXUzbE9l5lGlZNcMu4KNQ> Real
> > estate investment software<http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+software&w1=Investment+management+softwa
re&w2=Real+estate+investment+software&w3=Investment+property+software&
w4=Software+support&w5=Real+estate+investment+analysis+software&w6=Inv
estment+software&c=6&s=200&.sig=5_sgDczz3ArKGMtJ9tFSJA> Investment
> > property software<http://groups.yahoo.com/gads?
t=ms&k=Investment+property+software&w1=Investment+management+software&
w2=Real+estate+investment+software&w3=Investment+property+software&w4=
Software+support&w5=Real+estate+investment+analysis+software&w6=Invest
ment+software&c=6&s=200&.sig=_N6zcwefgp4eg5n6oX5WZw> Software
> > support<http://groups.yahoo.com/gads?
t=ms&k=Software+support&w1=Investment+management+software&w2=Real+esta
te+investment+software&w3=Investment+property+software&w4=Software+sup
port&w5=Real+estate+investment+analysis+software&w6=Investment+softwar
e&c=6&s=200&.sig=MJ2jP31F3n64RDZkDadU8w> Real
> > estate investment analysis software<http://groups.yahoo.com/gads?
t=ms&k=Real+estate+investment+analysis+software&w1=Investment+manageme
nt+software&w2=Real+estate+investment+software&w3=Investment+property+
software&w4=Software+support&w5=Real+estate+investment+analysis+softwa
re&w6=Investment+software&c=6&s=200&.sig=GmF8PlAJASx0wrSaX5-Zlw>
Investment
> > software<http://groups.yahoo.com/gads?
t=ms&k=Investment+software&w1=Investment+management+software&w2=Real+e
state+investment+software&w3=Investment+property+software&w4=Software+
support&w5=Real+estate+investment+analysis+software&w6=Investment+soft
ware&c=6&s=200&.sig=aMgGsKT4w29dMAYUzQUKzg>
> > ------------------------------
> > YAHOO! GROUPS LINKS
> >
> >
> > - Visit your
group "amibroker<http://groups.yahoo.com/group/amibroker>"
> > on the web.
> >
> > - To unsubscribe from this group, send an email to:
> > amibroker-unsubscribe@xxxxxxxxxxxxxxx<amibroker-
unsubscribe@xxxxxxxxxxxxxxx?subject=Unsubscribe>
> >
> > - Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> > Service <http://docs.yahoo.com/info/terms/>.
> >
> >
> > ------------------------------
> >
>
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
|