I try it but it doesn't work

--- In [email protected], "Kevin" <[EMAIL PROTECTED]> wrote:
>
> Missing brackets for the array references, maybe?
> 
> TitlePP[0]+TitlePP[1]+TitlePP[2]
> 
> --- In [email protected], "monriri2" <lamottefranck@> 
> wrote:
> >
> > With the follow function I try to test performance pattern for 
3/5 
> > and 8 periodes to obtain something like this for example:
> > 
> > #pattern : 52 (patterns found)  Per : 3 (back period)  5,1 (avg % 
> > gain)  52 ( % win trade)
> > 
> > 
> > function PP(Pattern) {// function Performance Pattern
> > P1=3;Step=5;i=0;
> > 
> > But I have the message "error 29 variable TitlePP0 used without 
> > having been initialized". I don't understand where is the problem
> > 
> > for( i = 0 ; i <= 2; i++ )  
> > { 
> > back=P1+(i*Step);
> > NumPattern          = LastValue(Cum(Pattern));
> > base[i]             = Ref(C,-back);
> > NextBar[i]          = Ref(Pattern,-back);
> > Result[i]           = IIf(NextBar[i],(C-base[i])/base[i]*100,0);
> > ResultTOT[i]        = LastValue(Cum(Result[i]));
> > ResultMOY[i]        = Nz(100*ResultTOT[i]/NumPattern);
> > UpTrade[i]  = Result[i] >0;
> > DnTrade[i]  = Result[i]<=0;
> > NumUpTrade[i]       = LastValue(Cum(UpTrade[i]));
> > NumDnTrade[i]       = LastValue(Cum(DnTrade[i]));
> > PatternWin[i]       = Nz(100*NumUpTrade[i]/(NumUpTrade[i]
+NumDnTrade[i]));
> > TitlePP[i] = 
> > "Per :   "+NumToStr(Back,1.0)+
> > "Result MOY : "+NumToStr(ResultMOY[i],1.1);
> > "% Win :      "+NumToStr(PatternWin[i],1.1)+"  ";
> > } // FIN for( i = 0 ; i <= 2; i++ )  
> > 
> > Titre= "#Patterns : "+NumToStr(NumPattern,1.0)
> > +TitlePP0+TitlePP1+TitlePP2;
> > return titre ; } // fin fonction PP
> >
>


Reply via email to