I found this definition of a PinBar at https://www.learntotradethemarket.com/forex-trading-strategies/pin-bars-forex-trading-definition , this is the screener (unused variables have been commented out):
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// definition of a candlestick
//
Body = abs (close - open )
UpperWick = high - max (open ,close )
LowerWick = min (open ,close ) - low
//Wicks = range - Body
//Bullish = close > open
//Bearish = close < open
//
// Definition of a PinBar
//https://www.learntotradethemarket.com/forex-trading-strategies/pin-bars-forex-trading-definition
//
PB = body <= (range * 0.10 ) //Body must be smaller than or equal to 10% of the candle's range (very small body)
bullPB = LowerWick >= (range * 0.67 ) //Bullish PinBars should have a lower wick greater than or equal to 67% of range
bearPB = UpperWick >= (range * 0.67 ) //Bearish PinBars should have a upper wick greater than or equal to 67% of range
BullishPB = PB and bullPB
BearishPB = PB and bearPB
PinBar = 0
IF BullishPB THEN
PinBar = 1
ELSIF BearishPB THEN
PinBar = 2
ENDIF
SCREENER [ PinBar] (PinBar as "1=↑,2=↓" )
It’s fairly simple to add other patterns, or make a new screener for each additional pattern.
Should you need further help, let us know.