Hi,
I am trying to build a indicator that will identify bullish and bearish pin bars with a certain size of nose and wick. I use the formula below on Excel to manually give me the figures, but would like to see if a indicator would identify these pin bars and highlight these with wicks over 0.40 and noses below 0.20
The formula I use on Excel is below:
Bearish Pin bar Wick: high – close or open / high – low
Bearish Pin bar nose: close or open – low / high – low
If anyone could help with this, it would be greatly appreciated?
Thanks
Derek
Hi Derek, I remember have coded something like this for the DRAWTEXT documentation, here: http://www.prorealcode.com/documentation/drawtext/
(the second example), but only for the bearish pinbar.
Hi Nicolas, just a quick question, example #2 (http://www.prorealcode.com/documentation/drawtext/) doesn’t work, apparently the system doesn’t recognize the text in quotation mark, how can i change this information?
many thanks!
Fabio
Because DRAWTEXT instruction is only available for the Prorealtime version 10.3
I just came across a good Pinbar code on the web:
value = 0
clong1 = low < low[1] and low<low[2]
clong2 = close >= low[1]-1 and open >= low[1]-1
clong3 = abs(open - close) < 4*range/10
clong4 = open > (low + range*5/10) and close > (low + range*5/10)
cshort1 = high > high[1] and high > high[2]
cshort2 = close <= high[1]+1 and open <= high[1]+1
cshort3 = abs(open - close) < 4*range/10
cshort4 = open < (high - range*5/10) and close < (high - range*5/10)
if clong1 and clong2 and clong3 and clong4 then
value = 10
elsif cshort1 and cshort2 and cshort3 and cshort4 then
value = -10
endif
return value
It returns the bullish and bearish ones. Maybe someone can add it to the library or I’ll add it later. Thanks.
thank you so much! Great job as usual!
Fab
Hi Nicolas,
Thank you for your reply and I am still using 10.2 so the drawtext option does not work for me. Regarding the second example, this does show the pin bars, but it also misses the pin bars that fall within my criteria which is a nose less than 0.20 and a wick that is greater than 0.40. when I use the formula within Excel in my first post, I try and identify these pin bars manually. Do you know if a indicator would be able to identify a bullish or bearish pin bar that would fall into this criteria regardless of the colour of the bar?
Thanks for your help.
Derek.
Hi,
The pin bar indicator now works and only shows pin bars that fit a certain criteria. I have only one problem is that the indicator will show these pin bars as the candle is forming and I would prefer the indicator to only show the pin bar once the candle has closed, so that it removes the false signals within the selected timeframe.
Can the indicator do this or would it have to be the screener that filters this?
If anyone can help please?
Thanks
Derek