Thanks for your reply Mike,
I will try to explain in deeper detail my purpose.
Imagine the following code:
SetOption("MaxOpenPositions", 10 );
Condition1=Close > MA(C,200);
Condition2=MA(C,10)>MA(C,200);
Condition3=Close > MA(C,5);
I want to implement the following logic:
Buy=Iif(Condition1==1 AND Condition2==2 AND (Condition3==1 OR
OpenPositions<5),1,0);
This is feasable?
Thanks
--- In [email protected], "Mike" <sfclimb...@...> wrote:
>
> 1. You'll have to define "less restrictive" before anyone can know if what
> you want is possible.
>
> 2. You will almost certainly have to write custom backtesting code in order
> to keep track of the number of open positions such that you may apply your
> "less restrictive" logic.
>
> http://www.amibroker.org/userkb/2008/03/16/amibroker-custom-backtester-interface-2/
>
> Mike
>
> --- In [email protected], "nunopires2001" <nunopires2001@> wrote:
> >
> > Hi,
> >
> > Anyone can point me in the right direction?
> >
> > --- In [email protected], "nunopires2001" <nunopires2001@> wrote:
> > >
> > > Hi,
> > >
> > > I am testing a trading system setting max open positions = 10.
> > >
> > > I would like to add some conditions, based on currently number of open
> > > positions.
> > > Lets say, if I have less than 5 open positions I will make my buy
> > > conditions less restrictive.
> > >
> > > Is this possible to do with Amibroker?
> > >
> > > Thanks
> > >
> >
>