PureBytes Links
Trading Reference Links
|
there is a dll in third party
Title="Average Weekly Bars";
WeekPrice = TwC();
Plot(C,"",1,64);
Plot( WeekPrice ,"",colorWhite,1);
Plot( TwMA (WeekPrice,3) ,"",colorBlue,1);
Plot( TwEMA (WeekPrice,3) ,"",colorRed,1);
> 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
|