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

Re: [amibroker] Re: Nth Profitable Open



PureBytes Links

Trading Reference Links

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


------------------------ Yahoo! Groups Sponsor --------------------~--> 
What would our lives be like without music, dance, and theater?
Donate or volunteer in the arts today at Network for Good!
http://us.click.yahoo.com/Tcy2bD/SOnJAA/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/