mmm! Nearly!
The sell condition uses the sell 1 condition or the sell 2 condition perfect.
But, the problem is when both signals  interweave.
If there is an open position in system1, and while it is opened, occurs the 
Condition 2 from the system2, the open position is closed using the sell 2 
condition;

I go on..

--- In [email protected], "Gonzaga" <gonzag...@...> wrote:
>
> I got it!
> Well, I'm not sure I get it. 
> I've thought a way to avoid the custom  backtester.
> I create an array that is filled with two numbers, 1 or 2. 1 means the trade 
> signal has been launched by system 1, and 2, the system 2.
> 
> After that, I read the array from n bars behind, using -barssince(buy)
> 
> Could this have sense?
> 
> This is the code instead of the custom backtest:
> 
> //BEGINING OF CODE--------------
> 
> Buy=IIf(Buy1,True,IIf(Buy2,True,False));
> 
> BuyPrice=Open;
> 
> typeBuy=IIf(Buy1,1,IIf(Buy2,2,0));//if buy1, array 'typebuy' is 1. If Buy2, 
> is 2. Else is 0
> 
> //sell using condition A if was bought using condition1. Sell using 
> condition2 if buy2
> 
> Sell=IIf(Ref(typebuy,-BarsSince(Buy))==1,   Cross(MA(C,50),MA(C,15)), 
>         IIf(Ref(typebuy,-BarsSince(Buy))==2,    Ref(Buy,-2) ,     False    ));
> 
> 
> //END OF CODE
> 
> greetings
> 
> 
> --- In [email protected], "Gonzaga" <gonzagags@> wrote:
> >
> > Ah, Ok 
> > don't worry - - No te preocupes.. ;-)
> > 
> > 
> > --- In [email protected], "Matthias K." <meridian202@> wrote:
> > >
> > > Que tal gonzaga?
> > > 
> > >  
> > > 
> > > After sending this email, I figured that this might happen: I was 
> > > answering
> > > to Paul's post. Strange Yahoo, sorry for the confusion. I'm afraid I 
> > > cannot
> > > help you on your custom backtest proc, yet.
> > > 
> > >
> >
>


Reply via email to