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

RE: [amibroker] Re: Nth Profitable Open



PureBytes Links

Trading Reference Links

Thanks for your feedback Owen,

it seems to work much better with exremSpan (although curiously I am getting
a slightly higher number of trades - I suspect I need to review the settings
properly for that)

My only comment about this is that exRemSpan would work fine on simple fixed
nBar exits, but not necessarily on more complex conditions e.g.

Exit after 5 bars if loss
Exit after 20 bars if profit

(In which case, if one sets exremspan(buy,20), it won't pick up buy signals
which occur between the 6th and the 20th bar, if you already exit the trade
after 5 bars)

This also holds true if one tries to set targets that change according to
how long one has been in the trade (e.g. tighten a trailing stop after 20
days in the trade)

Any comments anyone?

Regards,
Claude






-----Original Message-----
From: Owen Davies [mailto:owen5819@xxxxxxxxxxxx] 
Sent: Thursday, March 24, 2005 11:14
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Nth Profitable Open


Claude Caruana wrote:

> While we're on this subject I've been having problems with this logic 
> since I started using AB and haven't quite got round it yet.
>
> E.g if I implement a simple n-bar stop using applystop function it 
> works perfectly...
>
> I try implementing the same logic through code without using applystop:
>
> Buy=1;
>
> Sell=barssince(buy)==3;
>
> Buy=ExRem(Buy,Sell);
>
> Sell=ExRem(Sell,Buy);
>
> Anybody can help point out what am I doing wrong??

At a guess, your Buy conditions can occur more than once within the 
3-bar period. ExRem() doesn't get rid of the extra Buy triggers because, 
in effect, the BarsSince() count begins again every time you get another 
entry signal. (I understand this is technically not what happens, but 
the end result is pretty much the same.) So there isn't an exit, and the 
ExRem() statement never takes effect.

Look at ExRemSpan(). It eliminates extra signals for a specified period, 
giving your time stop a chance to work.

Owen Davies



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



 






------------------------ Yahoo! Groups Sponsor --------------------~--> 
In low income neighborhoods, 84% do not own computers.
At Network for Good, help bridge the Digital Divide!
http://us.click.yahoo.com/EpW3eD/3MnJAA/cosFAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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/