PureBytes Links
Trading Reference Links
|
Hello Greg,
Try this:
WeeklyOpen=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),Open);
Weeklyhigh=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),High);
WeeklyLow=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),Low);
WeeklyClose=ValueWhen(DayOfWeek() > Ref( DayOfWeek(),1),Close);
Weekly_avg=(WeeklyOpen+Weeklyhigh+WeeklyLow+WeeklyClose)/4;
Cross(weekly_avg, EMA (weekly_avg,40) );
Filter=Cross(weekly_avg, EMA (weekly_avg,40) );
AddColumn( weekly_avg, "weekly_avg" );
AddColumn( EMA (weekly_avg,40), "ema (weekly_avg,40)" );
Anthony
"Greg Q. Liu" wrote:
> I try to write an AFL fomula to scan weekly crossing for 4 week
> periods by using daily data
> as weekly_avg=(weekly_high+weekly_low+weekly_open+weekly_close)/4;filter=cross(weekly_avg,
> ema (weekly_avg,40) );addcolumn( weekly_avg, "weekly_avg" );addcolumn(
> ema (weekly_avg,40), "ema (weekly_avg,40)" ); But I only have daily
> data, how this can be done? Thanks. GL
>
>
> Yahoo! Groups Sponsor
ADVERTISEMENT
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
|