Hi guys,
Would appreciate it if somebody could help with my proscreener. So when im selecting criteria using the simple method (click on chart), i can’t see the donchian channel up or donchian channel down as one of the parameters. The criteria I want to meet is the exact same as below screener i have working, except I want to replace indicator1 with donchian channel down, and replace indicator2 with donchian channel up. (I want the donchian channel to be a criteria of last 70 period). As you can see the criteria work for SMA 100 and EMA 20, however I would like to replace them with donchian channel down, and donchian channel up.
indicator1 = Average[100](close)
c1 = (close CROSSES UNDER indicator1)
indicator2 = ExponentialAverage[20](close)
c2 = (close CROSSES OVER indicator2)
SCREENER[c1 OR c2] (Variation AS "%Chg prev bar")
Many thanks in advance!
So here is the code that use the Donchian channel up and down of 70 periods. The screener scan the stocks that break the channel.
indicator1 = lowest[70](low)[1]
c1 = (close CROSSES UNDER indicator1)
indicator2 = highest[70](high)[1]
c2 = (close CROSSES OVER indicator2)
SCREENER[c1 OR c2] (Variation AS "%Chg prev bar")
indicator1 = donchianchanneldown[70][1]
c1 = (close CROSSES UNDER indicator1)
indicator2 = donchianchannelup[70][1]
c2 = (close CROSSES OVER indicator2)
SCREENER[c1 OR c2] (Variation AS "%Chg prev bar")
Typo. Line 1 should read:
indicator1 = lowest[70](low)[1]
Thanks Roberto! I modified it.
Many thanks Nicolas and Roberto!