PureBytes Links
Trading Reference Links
|
I have borrowod from Anthony Faragasso code in an attempt to produce
weekly time frame moving averages on a daily chart. Below is the
code I have used and it produces MAs that have no no resemblance to
the MAs on the Weekly chart itself.
/Weekly MAs on daily charts
weekstart = DayOfWeek() < Ref( DayOfWeek(), -1 );
weekend = DayOfWeek() > Ref( DayOfWeek(),1);
/**Establish weekly Price Arrays**/
WeeklyHigh = ValueWhen( weekend, HighestSince( weekstart, High ) );
WeeklyLow = ValueWhen( weekend, LowestSince( weekstart, Low ) );
Plot(MA(WeeklyHigh,17),"WkHIGHMA",colorRed,styleLine);
Plot(MA(WeeklyLow,17),"WkLOWMA",colorGreen,styleLine);
Plot(Close,"CLOSE",colorBlack,styleCandle);
Plot(LinearReg(Close,17),"linReg",colorRed,styleLine);
Can someone assist me with by pointing out where I have gone wrong.
Regards,
Keith
|