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

Re: [amibroker] Hold Days - why not working?



PureBytes Links

Trading Reference Links

Hello,
 
Just use built-in N-bar stop, then you don't need to worry about repeated signals.
 
ApplyStop( stopTypeNBar, stopModeBars, HoldDays );

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Paul Ho
Sent: Sunday, March 09, 2008 11:09 AM
Subject: RE: [amibroker] Hold Days - why not working?

This is because a new buy signals appears before Holdays are up, resetting barssince to zero.


From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of bernardedmond01
Sent: Sunday, 9 March 2008 3:25 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Hold Days - why not working?

Hi
I coded this to sell immediately after so many days:
Sell = (BarsSince(Buy) >= HoldDays);
In some cases, the backtester does sell on the next open after my
stipulated number of days but other times it holds for much longer. I
haven't got any other sell commands. What am I doing wrong? Should I
code:
Sell = (BarsSince(Buy) = HoldDays) instead and set trade delay 1?
Thanks

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___