Help me to adapt an existing code (Piercing pattern)
Forums › ProRealTime English forum › ProScreener support › Help me to adapt an existing code (Piercing pattern)
- This topic has 3 replies, 2 voices, and was last updated 3 years ago by jimkn0pf.
Tagged: pattern, Piercing, Piercing pattern
-
-
11/14/2020 at 11:13 PM #150530
Hi,
I have absolutely zero knowledge about coding. Therefore I need some help which will take an experienced guy literally 3 minutes. Cristof wrote the code for the piercing pattern, which I attached.
It finds the piercing pattern, after it was confirmed by a third, a bullish candle.What I need is this code WITHOUT the candle that follows the piercing pattern. I would like to find the piercing pattern in “real time”, without having to wait for the third candle for confirmation.
As i mentioned, I assume it is pretty easy to adapt the existing code for somebody experienced, so I hope that you will find some time.
Thanks in advance
12345678910111213141516171819202122232425262728293031323334353637383940// Piercing pattern is a downtrend follow by a bullish candle// that closes above 50% of the preceding bearish candle,// that could indicate a reversal,// this screener includes a fairly good confirmation of that pattern,// it starts from a bullish candle, and it finds the pattern in the two previous candles// @Cristofer (=// V1currentClose = ClosecurrentOpen = Open// Bullish candlec1 = currentOpen < currentClosepiercingHigh = High[1]piercingClose = Close[1]piercingOpen = Open[1]piercingLow = Low[1]// piercing is bullishc2 = piercingClose > piercingOpenbearishHigh = High[2]bearishOpen = Open[2]bearishClose = Close[2]bearishLow = Low[2]// is a bearish candlec3 = bearishOpen > bearishClose// lower high, lower lowc4 = bearishHigh > piercingHigh AND bearishLow > piercingLow// piercing opens lower than bearish closec5 = piercingOpen < bearishClose// piercing closes above 50% level of the bearish candlec6 = ((bearishOpen + bearishClose) / 2) < piercingClose AND piercingClose < bearishOpenSCREENER[c1 AND c2 AND c3 AND c4 AND c5 AND c6]11/14/2020 at 11:28 PM #150533Always use the ‘Insert PRT Code’ button when putting code in your posts to make it easier for others to read.
Thank you 🙂
11/14/2020 at 11:38 PM #150534This should do (not tested):
12345678910111213141516171819202122232425262728293031323334353637383940// Piercing pattern is a downtrend follow by a bullish candle// that closes above 50% of the preceding bearish candle,// that could indicate a reversal,// this screener includes a fairly good confirmation of that pattern,// it starts from a bullish candle, and it finds the pattern in the two previous candles// @Cristofer (=// V1currentClose = ClosecurrentOpen = Open// Bullish candlec1 = 1 OR (currentOpen < currentClose)piercingHigh = High[0]piercingClose = Close[0]piercingOpen = Open[0]piercingLow = Low[0]// piercing is bullishc2 = piercingClose > piercingOpenbearishHigh = High[1]bearishOpen = Open[1]bearishClose = Close[1]bearishLow = Low[1]// is a bearish candlec3 = bearishOpen > bearishClose// lower high, lower lowc4 = bearishHigh > piercingHigh AND bearishLow > piercingLow// piercing opens lower than bearish closec5 = piercingOpen < bearishClose// piercing closes above 50% level of the bearish candlec6 = ((bearishOpen + bearishClose) / 2) < piercingClose AND piercingClose < bearishOpenSCREENER[c1 AND c2 AND c3 AND c4 AND c5 AND c6]1 user thanked author for this post.
11/15/2020 at 1:35 PM #150555 -
AuthorPosts