Or this variation on Herman's theme.

DN = DateNum();

Newday = DN != Ref(DN,-1);

BarsIntoDay = BarsSince( NewDay );

S = Sum(C,BarsIntoDay);
AveClose = S/BarsIntoDay;

Plot( C,"",1,128);

Plot(AveClose,"AveClose",2,1);

sorry can't follow up as i will be at the beach.

pretty sure it works.

except it doesn't count the first bar but the error will be small 
after a .few bars.

u could add a small correctin for hte first bar

Reply via email to