Hi Preston,
MMD:= ValueWhen(1,DayOfWeek()=1,MACD());
MAMD:=Mov(mmd,10,S);
If(DayOfWeek()=1,MAMD,0);
The second code does not average the monday Macd(). Trying to create something:
MMD:= ValueWhen(1,DayOfWeek()=1,MACD());
MMD1:= ValueWhen(2,DayOfWeek()=1,MACD());
MMD2:= ValueWhen(3,DayOfWeek()=1,MACD());
If(DayOfWeek()=1,MAMD + MMD1 + MMD2,0);
The problem with using valuewhen is require to define each previous value and for a average of 20 there are 20 definition MMD. Is there a good way to code this?
Regards.