When try to put the Creation of Mr Rodney Platt into my Metastock 9.1 Pro for E-Signal, didn't work correctly.
What i mean?
I put into the Metastock:
--->Start--->
Days:=Cum(1);
DaysLoaded:=LastValue(Days);
DaysRemaining:=DaysLoaded-Days;
StartOfMonth:=(Month()>Ref(Month(),-1))
OR (Month()=1 AND Ref(Month(),-1)=12);
Months:=Cum(StartOfMonth);
MonthsLoaded:=LastValue(Months);
MonThsRemaining:=MonthsLoaded-Months;
EndOfMonth:=(Month()<Ref(Month(),1))
OR (Month()=12 AND Ref(Month(),1)=1);
HighDaysAgo:=If(EndOfMonth,HighestSinceBars(1,StartOfMonth,HIGH),0);
LastHigh:=LastValue(HighestSinceBars(1,StartOfMonth,HIGH));
LowDaysAgo:=If(EndOfMonth,LowestSinceBars(1,StartOfMonth,LOW),0);
LastLow:=LastValue(LowestSinceBars(1,StartOfMonth,LOW));
DaysPassed:=BarsSince(StartOfMonth);
LastDay:=LastValue(DaysPassed);
DaysLeftInMonth:=If(MonthsRemaining>0,
LastValue(ValueWhen(LastValue(MonthsRemaining+PREV-PREV),
Endofmonth,DaysPassed)),LastDay)-DaysPassed;
currenthigh:=If(MonthsRemaining>0,
LastValue(ValueWhen(LastValue(MonthsRemaining+PREV-PREV),
EndOfMonth,HighDaysAgo)),LastHigh);
currentLow:=If(MonthsRemaining>0,
LastValue(ValueWhen(LastValue(MonthsRemaining+PREV-PREV),
EndOfMonth,LowDaysAgo)),LastLow);
HighDay:=If(DaysLeftInMonth=Currenthigh,1,0);
LowDay:=If(DaysLeftInMonth=CurrentLow,-1,0);
HighDay;
LowDay;
<---End<---
But when i put the same Formula without the:
--->Start--->
and the
<---End<---
into the Metastock, the Formula work!
Dear Jose what happen?
George K.