si puo realizzare un screener basato su canale di donchian settato a 10 periodi con timeframe settimanale in cui partendo dalla linea centrale il prezzo impieghi 4 candele per sforare la linea superiore del suddetto canale? allego foto
Eccolo (non l’ho provato):
Timeframe (Weekly)
p = 10
shift = 1
maxN = 4
If BarIndex = 0 or n >= MaxN Then
n = 0
Endif
Upper = HIGHEST[p](High[shift])
Lower = LOWEST[p](Low[shift])
Middle = (Upper + Lower) / 2
If n < MaxN and n > 0 then
n = n + 1
Endif
If Close > Middle and Low <= Middle and n = 0 and close > open Then
n = 1
Endif
Timeframe (default)
Segnale = 0
If n = MaxN and High > Upper Then
Segnale = 1
n = 0
Endif
Screener[Segnale]