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

[amibroker] Re: close trades on equity drawdown



PureBytes Links

Trading Reference Links

Thanks, I've written some code in custom backtester which seems to 
be working. Do you know of a better way to find out which bar the 
trade opens than using if(Openpos.barsintrade==1)...? this seems 
less direct that the isentry() command.

Hugh

--- In amibroker@xxxxxxxxxxxxxxx, "gp_sydney" <gp.investment@xxx> 
wrote:
>
> Assuming those two trades are in different stocks, I think you may
> need to use the custom backtester interface.
> 
> If they were both long trades, or both short trades, you might have
> been able to do something with AddToComposite and then ApplyStop 
with
> a percentage drop, but I can't think how that would work with one 
long
> trade and one short.
> 
> GP
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "huandy631" <hugh.andersen@> 
wrote:
> >
> > Hi
> > I am trying to code a system whereby two trades are entered into 
(one 
> > long and one short) at the same time. I would like both trades 
to 
> > close if the combined equity since open reduces by 10%. Can this 
be 
> > done using high level code, or does it have to be done using the 
> > customized backtester? If it has to be done using the customized 
> > backtester, is there anyone out there who is an expert and can 
show me 
> > what I'm missing?
> > 
> > thanks
> > 
> > Hugh
> >
>




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/