technicals using weekly data

I want to add a technical filter as simple as :

buy whenever close(0) > last 4 weeks highest of 52 weeks moving average of weekly close price, hold until close(0) < 90% of latest indicator level.

is this possible ?