Hello,
You have to run PORTFOLIO backtest (the default
one).
All new features are available in PORTFOLIO BACKTESTER
only,
so you will see effect ONLY if you run PORTFOLIO
backtest
and then you will see in the RESULT LIST that there was NO
exit during 10 bars.
New features like HoldMinBars do not work in OLD
backtester.
Specifically Equity() function is running OLD
single-security backtester.
Best regards, Tomasz
Janeczko amibroker.com
----- Original Message -----
Sent: Saturday, April 08, 2006 6:08
AM
Subject: [amibroker] Re: Please help with
ApplyStop() function (TJ)<------ TJ
ref: HoldMinBars
TJ, I upgraded to 4.79 BETA
and tried your code snippet. The system still allows sell signals before
the HoldMinBars value is reached. Below is a symple system I tested with
the new function. "HoldMinBars" does not prevent SELL signals from
occuring within the specified HoldPeriod.
Are there any other system
variable that must be set in order to enable this new function?
//
============= CODE ===================
HoldPeriod = 10;
//BUY
RULE Buy = Cross(MA(C,5),MA(C,30));
//SELL
RULEs SetOption("HoldMinBars", HoldPeriod );
Sell = H >
Ref(H,-1);;
//Update the
arrays Equity(1);
ExRem(Buy,Sell); ExRem(Sell,Buy);
---
In [email protected], "Tomasz Janeczko" <[EMAIL PROTECTED]>
wrote: > > Hello, > > It is easy ( 2 lines of code)
with NEW AmIBroker feature called HoldMinBars > >
SetOption("HoldMinBars", 30 ); > > > 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 ----- > From: gosub283
> To: [email protected] > 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); > > > >
> > > > > > >
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 > > a.. Visit
your group "amibroker" on the web. >
> b.. To unsubscribe from this group,
send an email to: >
[EMAIL PROTECTED] >
> c.. Your use of Yahoo! Groups is
subject to the Yahoo! Terms of Service. > >
> ------------------------------------------------------------------------------ >
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
SPONSORED LINKS
YAHOO! GROUPS LINKS
|