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

Re: [amibroker] Re: Please help with ApplyStop() function (TJ)



PureBytes Links

Trading Reference Links

you can try using exrempsan to stop additional buy signals after the first.
I thought there was also a new function in the betas, but that is another story

--
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 4/7/06, gosub283 <gosub283@xxxxxxxxx> wrote:
>
> Terry,
>
> Thanks for your suggestion.
> You are right,....the multiple BUY conditions that my system
> generates are what's messing up my sell signals.
> Normally, I us ExRem(Sell,Buy) and Equity() to make sure the signals
> display properly.
>
> I can't change the multiple buy signals, therefore
> can you elaborate on the subject of tracking the BUY bar in a loop ?
>
> Thanks,
> Gosub283
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Terry" <MagicTH@xxx> wrote:
> >
> > You'll have to set your own nBar stop. Try this:
> >
> > Buy = yourConditions:
> > Sell = BarsSince(Buy) > HoldPeriod AND H > Ref(H,-1);
> >
> > You need to make sure you do not have multiple Buy conditions being True
> > on multiple bars or this won't work. If that is the case, and you can't
> > fix it, you can always track the Buy bar in a loop.
> >
> > (I have not tested this code.)
> > --
> > Terry
> > -----Original Message-----
> > From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On
> > Behalf Of gosub283
> > Sent: Thursday, April 06, 2006 12:52
> > To: amibroker@xxxxxxxxxxxxxxx
> > Subject: [amibroker] Please help with ApplyStop() function (TJ)
> >
> >
> > Hi,
> >
> > I use a time based stop to exit trades.
> > The ApplyStop function works very well.
> > How can I add an additional rule to achieve the
> > following logic:
> >
> > After 'n' days, sell on the first day in which the
> > HIGH is lower than the previous day's HIGH
> >
> > ==============================================
> > Current sell rule:
> >
> > HoldPeriod = 30;
> >
> > // Time-based stop
> > ApplyStop( stopTypeNBar, stopModeBars, HoldPeriod);
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > 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
>
>
>
>
>
>
>
>


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/