PureBytes Links
Trading Reference Links
|
Try this:
---8<-----------------------
{ Today's data date, user input section }
day:= 31; { today (1~31) }
mth:= 01; { current month (1~12) }
yr:= 2004; { current year, eg 2004 }
{ *********************************** }
active:=Year()>yr-1
OR (Year()=yr-1 AND (Month()>mth
OR Month()=mth AND DayOfMonth()>=day));
start:=Cum(active)=1;
C>Ref(HighestSince(1,start,C),-1)
---8<-----------------------
jose '-)
--- In equismetastock@xxxxxxxxxxxxxxx, "Tim Hyder" <prez@xxxx> wrote:
> Hi All,
>
> I have created an expert to colour in all candles that are at a new
12
> month high.
>
> However I am having troubles with all charts that have less than 12
> months worth of data, as the expert keeps generating errors, which
is
> then causing me other problems.
>
> Originally I had it nice and simple.
> H=HHV(H,260);
>
> After getting the errors I tried
> X:=Cum(1);
> If(X>=260,H=HHV(H,260),0);
>
> But I am still getting the error, as it seems that MS executes all
> elements of the IF statement in the compiler and so still raises the
> error, even though this part of the code is irrelevant.
>
> Am I looking at this all wrong, and does anyone know a work around
for
> this problem.?
>
> Regards,
> Tim.
Yahoo! Groups Links
To visit your group on the web, go to:
http://groups.yahoo.com/group/equismetastock/
To unsubscribe from this group, send an email to:
equismetastock-unsubscribe@xxxxxxxxxxxxxxx
Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|