If I now use this indicator as a screener, it does not show me this signal.
Does anyone have an idea what I am doing wrong?
Here is the Code from the indicator
Bearish Three Line Strike
1
2
3
4
5
6
7
8
9
10
11
12
13
t1=close[3]<open[3]// candle 4 = red candle
t2=close[2]<open[2]andlow[2]<low[3]andopen[2]<open[3]// candle 3 = red candle, lower low & open than previous candle
t3=close[1]<open[1]andlow[1]<low[2]andopen[1]<open[2]// candle 2 = red candle and lower low & open than previous candle
t4=low[0]<low[1]andclose[0]>high[3]// candle 1 = green candle, opens lower than previous candle and closes above open of 4th candle. The candle engulfs the bodies of the three preceding black candles
ift1andt2andt3andt4then
DRAWvLINE(barindex)coloured(0,255,0,50)
DRAWCANDLE(open,high,low,close)COLOURED(0,250,0)
Trend=1
endif
RETURN
And here is the code from the screener
Screener for Bearish Three Line Strike
1
2
3
4
5
6
7
8
9
10
11
12
13
signal=0
condition=(open[250]-close[1])
t1=close[3]<open[3]// candle 4 = red candle
t2=close[2]<open[2]andlow[2]<low[3]andopen[2]<open[3]// candle 3 = red candle, lower low & open than previous candle
t3=close[1]<open[1]andlow[1]<low[2]andopen[1]<open[2]// candle 2 = red candle and lower low & open than previous candle
t4=low[0]<low[1]andclose[0]>high[3]// candle 1 = green candle, opens lower than previous candle and closes above open of 4th candle. The candle engulfs the bodies of the three preceding black candles
ift1andt2andt3andt4then
signal=1
endif
SCREENER[conditionandsignal>0]sortbysignalas"Type"//[condition and t1 and t2 and t3 and t4]
Thank you very much for your answer. With the variable “condition” I wanted to look back at most the last 250 candles (actually even less) If I remove the variable, the screener shows me matches from 2014 :-). I only wanted to display matches that are no more than 1 week old.