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

[amibroker] Re: Setting a conditional N-Bar stop



PureBytes Links

Trading Reference Links

That worked nicely.

Relatively new to Amibroker so still trying to work out these little techniques.

Thanks Mike!

--- In amibroker@xxxxxxxxxxxxxxx, "Mike" <sfclimbers@xxx> wrote:
>
> You could probably do it without custom backtesting at all. Try something along the lines of the following (untested):
> 
> Buy = ...;
> BuyPrice = ...;
> 
> Bought = ExRemSpan(Buy, 5);
> BoughtPrice = ValueWhen(Bought, BuyPrice);
> 
> X = ...; // Desired percent profit expressed as fraction e.g. 0.05
> NormalSell = ...;
> FailureSell = Ref(Bought, -5) && Close < BoughtPrice * (1 + X)
> 
> Sell = NormalSell OR FailureSell;
> 
> 
> Mike
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, Mark Hike <markhike@> wrote:
> >
> > Yes, you can do all these using the advanced low level custom portfolio
> > backtester.
> > 
> > On Fri, Nov 13, 2009 at 12:53 AM, an0n73 <an0n73@> wrote:
> > 
> > >
> > >
> > > Hi,
> > >
> > > I would like to do the following but not sure if it's possible or how to do
> > > it. Any ideas?
> > >
> > > After a Buy is triggered, I want to wait N days (say 5 days) and if by that
> > > time the trade hasn't made x% profit then I want to sell. If the trade is
> > > making > x% profit after N days then that's fine and I want it to carry on
> > > as normal until the trade ends normally using my sell condition.
> > >
> > > So, if the trade hits 2% (or 2R) profit within 5 days then ignore the stop
> > > and carry on. If by day 5 the profit is less than 2% then exit the trade.
> > >
> > > The idea is that by 5 days, I know whether the trade is going to work for
> > > me or not and if it isn't making any money by that time then I want out.
> > >
> > > Is this possible and if so how?
> > >
> > > Thanks
> > >
> > >  
> > >
> >
>




------------------------------------

**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to 
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

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:
    amibroker-digest@xxxxxxxxxxxxxxx 
    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/