start = H==TimeFrameGetPrice("H",inDaily);
sh=ValueWhen(start,H);
sl=ValueWhen(start,L);
mp = IIf(sh>Ref(H,-1),H,IIf(sl<Ref(L,-1),L,C));
PV = mp * V;
CV = Cum( V );
VSS = CV - ValueWhen( start, CV );
denom = IIf( VSS == 0, 1, VSS );
num = Cum( PV ) - ValueWhen( start, Cum( PV ) );
M = IIf( BarsSince( start ), num/denom, mp );
//Plot( C, Date() + "Close", colorBlack, styleBar );
Plot( M, "\n M : ", colorBlue ,styleThick);