[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Metastockusers] Daily moving average on hourly charts



PureBytes Links

Trading Reference Links

The following code is an attempt to superimpose daily moving averages 
on hourly charts. Has anyone got a more professional solution to this 
type of indicator?
========================================

Hr:=If(Hour()<Ref(Hour(),-1),1,0);
Dc1:=ValueWhen(1,Hr,C);
Dc2:=ValueWhen(2,Hr,C);
Dc3:=ValueWhen(3,Hr,C);
Dc4:=ValueWhen(4,Hr,C);
Dc5:=ValueWhen(5,Hr,C);
Dc6:=ValueWhen(6,Hr,C);
Dc7:=ValueWhen(7,Hr,C);
Dc8:=ValueWhen(8,Hr,C);
Mov8:=(Dc1+Dc2+Dc3+Dc4+Dc5+Dc6+Dc7+Dc8)/8;
Mov8

=========================================


Thanks,

Tim



 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/Metastockusers/

<*> To unsubscribe from this group, send an email to:
     Metastockusers-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/