Hello,
It is easy ( 2 lines of code) with NEW AmIBroker feature
called HoldMinBars
SetOption("HoldMinBars", 30 );
Sell = H >
Ref(H,-1);
This new feature works so that it ignores sell
signals during hold min bars period.
HoldMinBars requires version 4.79.0
Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
Sent: Thursday, April 06, 2006 8:51
PM
Subject: [amibroker] Please help with
ApplyStop() function (TJ)
Hi,
I use a time based stop to exit
trades.
The ApplyStop function works very well.
How can I add an
additional rule to achieve the
following logic:
After 'n' days,
sell on the first day in which the
HIGH is lower than the previous day's
HIGH
==============================================
Current sell
rule:
HoldPeriod = 30;
// Time-based stop
ApplyStop(
stopTypeNBar, stopModeBars,
HoldPeriod);