Hi, I have tried to create a screener which detect the first body of a candle above or below the Donchian(8) channel on the H1 timeframe.
This is what if have so far. The screener came up with 45 hits but does not seems to regonize the parameters.
Anybody any idea how to fix this (simple) screener?
// Donchian Daytrading Screener
//datum 11/10/2017 versie 1.0
ind=Donchian[8]
body=close-open
C1=body>Donchian[8]
C2=body<Donchian[8]
SCREENER (C1 or C2)
“Donchian” is not a ProScreener instruction, you have to build yourself the upper and lower Donchian channel lines. Comparing your “body” variable (which is a difference of 2 prices in points) with the Donchian channels in price value, lead to nothing 🙂
..and SCREENER conditions must be in brackets, not in parenthesis.
First below or first above is not possible, because if you are above you are the new Donchian upper line and vice-versa if you are below, so we are comparing with the previous period of each of the channel line.
//donchian channels 8 periods
hh = highest[8](high)
ll = lowest[8](low)
//first above?
above = open>hh[1] and close>hh[1] and open[1]<hh[2] and close[1]<hh[2]
//first below?
below = open<ll[1] and close<ll[1] and open[1]>ll[2] and close[1]>ll[2]
screener[above or below]