study("Pin bar")
>= bullish_bar(third_part_pos)
complete_body_length = 0
tail_length = 0
else
>= bearish_bar(third_part_pos)
complete_body_length = 0
tail_length = 0
else
>= )(isPinBar
third_part_range = range / 3
bullish_pin_bar = bullish_bar(third_part_pos_bullish)
bearish_pin_bar = bearish_bar(third_part_pos_bearish)
result := -1
result
plot(isPinBar())