Está en el hilo
//---Initialisation
prd= 5
once idx0 = 0
once idx1 = 0
once idx2 = 0
once pos = 0
IF barindex >= 2*prd+1 then
If high[prd] >= highest[2*prd+1](high) and pos<=0 then
If idx1 <> 0 then
idx2 = idx1
Endif
If idx0 <> 0 then
idx1 = idx0
Endif
idx0 = barindex[prd]
pos=1
Endif
If Low[prd] <= Lowest[2*prd+1](low) and pos>=0 then
If idx1 <> 0 then
idx2 = idx1
Endif
If idx0 <> 0 then
idx1 = idx0
Endif
idx0 = barindex[prd]
pos=-1
Endif
If idx2<>0 then
If pos=1 and High[barindex-idx0]>Low[barindex-idx1] and High[barindex-idx0]<High[barindex-idx2] and (Close<Low[barindex-idx1] and open>Low[barindex-idx1]) then
setupshort=1
else
setupshort=0
Endif
If pos=-1 and Low[barindex-idx0]<High[barindex-idx1] and Low[barindex-idx0]>Low[barindex-idx2] and (Close>High[barindex-idx1] and open<High[barindex-idx1]) then
setuplong=1
else
setuplong=0
endif
Endif
Endif
c29 = Average[52](volume*close) > 3000000
screener[setuplong or setupshort and c29](setupshort as "SH",setuplong as "LG")
Este código ya es el modificado por Iván?, o es el que ya hizo Iván y se le pide una mejora?