SmoothPeriod=2
period=5
timeframe(weekly)
IF BarIndex=0 THEN
wxClose = (open+high+low+close)/4
wxOpen = open
ELSE
wxClose = (open+high+low+close)/4
wxOpen = (wxOpen[1]+wxClose[1])/2
endif
if barindex>=(period+SmoothPeriod) then
wAvOpen=exponentialAverage[SmoothPeriod](wxOpen)
wAvclose=exponentialAverage[SmoothPeriod](wxClose)
endif
weeklybull = wavclose>wavopen and wavclose[1]<wavopen[1]
timeframe(daily)
// ciclo normal
IF BarIndex=0 THEN
xClose = (open+high+low+close)/4
xOpen = open
ELSE
xClose = (open+high+low+close)/4
xOpen = (xOpen[1]+xClose[1])/2
endif
if barindex>=(period+SmoothPeriod) then
AvOpen=exponentialAverage[SmoothPeriod](xOpen)
Avclose=exponentialAverage[SmoothPeriod](xClose)
endif
dailybull = avclose>avopen and avclose[1]<avopen[1]
up = dailybull and weeklybull
screener[up]