Pro screeners/trend-reversal-continuation patterns
Forums › ProRealTime forum Français › Support ProScreener › Pro screeners/trend-reversal-continuation patterns
- This topic has 2 replies, 2 voices, and was last updated 3 years ago by Manu L..
-
-
03/10/2021 at 5:10 PM #163739
Bonjour,
existe-t-il un screnner en partant de celui-ci https://www.prorealcode.com/prorealtime-market-screeners/trend-reversal-continuation-patterns/
mais pourrait ressortir uniquement les figures qu’on lui demande de sortir via une sélection ou validation à 0 ou 1 dans le programme.
Merci pour votre aide
03/10/2021 at 5:27 PM #163740Avec le code ci-dessous tu actives / désactives les patterns de bougies que tu souhaites avec les variables qui commencent par Active… (0 = désactiver ; 1 = activer).
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132// Five Candlestick Patterns//// The 5 most powerful classical Candlestick Patterns// Trend reversal and continuation patterns// Coded by Violet// 4-12-2017//// Based on the work of Thomas Bulkowski in his book: "Encyclopedia of Candlestick Charts", 2008// Read a summary here: https://www.investopedia.com/articles/active-trading/092315/5-most-powerful-candlestick-patterns.asp//// This *market-wide screener* works along similar lines as this *fund-specific indicator* in the PRC library list: "Candlestick patterns recognition"//// Signal codes and pattern types//**************************************************************************// Type Direction Bulkowski's Occurrence// Name of pattern accuracy rate// ------- ------------ ------------ ----------// 1 = ThreeLineStrikeUp Bullish Reversal 84% truly rare// 2 = TwoBlackGappingDown Bearish Continuation 68% common// 3 = ThreeBlackCrows Bearish Continuation 78% common// 4 = EveningStar Bearish Reversal 72% very low// 5 = AbandonedBaby Bullish Reversal 70% low//**************************************************************************//ActiveThreeLineStrikeUp = 1ActiveTwoBlackGappingDown = 1ActiveThreeBlackCrows = 1ActiveEveningStar = 1ActiveAbandonedBaby = 1// ---------------------------------------ThreeLineStrikeUp = 0TwoBlackGappingDown = 0ThreeBlackCrows = 0EveningStar = 0AbandonedBaby = 0signal = 0// 1 - Three Line Strike Up *************************************// Bulkowski accuracy rate 84%, frequency: very raret1 = close[3] < open[3] // candle 4 = red candlet2 = close[2] < open[2] and low[2] < low[3] and open[2] < open[3] // candle 3 = red candle, lower low & open than previous candlet3 = close[1] < open[1] and low[1] < low[2] and open[1] < open[2] // candle 2 = red candle and lower low & open than previous candlet4 = open[0] < low[1] and close[0] > open[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 candlesif t1 and t2 and t3 and t4 thenThreeLineStrikeUp = 1endif// 2 - Bearish Two Black Gapping *************************// Bulkowski accuracy rate 68%, frequency: commonb1 = close[1] < open[1] // red candleb2 = close[0] < open[0] // followed by another red candleb3 = high[0] < low[1] // with a down gap in betweenif b1 and b2 and b3 thenTwoBlackGappingDown = 1endif// 3 - Three Black Crows *********************************// Bulkowski accuracy rate 78%, frequency: very commonc1 = close[2] < open[2]c2 = close[1] < open[1] and close[1] < low[2]c3 = close[0] < open[0] and close[0] < low[1]// Closing prices are less than 1/3 from lowsc4 = abs(close[2] -low[2]) < range[2] / 3c5 = abs(close[1] -low[1]) < range[1] / 3c6 = abs(close[0] -low[0]) < range[0] / 3if c1 and c2 and c3 and c4 and c5 and c6 thenThreeBlackCrows = 1endif// 4 Evening Star **************************************************// Bulkowski accuracy rate 72%, frequency lowe1 = close[2] > open[2] // green candlee2 = open[1] > close[2] and close[1] > close[2] and low[1] > close[2] // candle entirely above predecessor's bodye3 = close[0] < open[0] and high[0] < low[1] // red candle with a gape4 = range[1] < (range[2] / 2 ) // evening star's range is small compared to preceding candleif e1 and e2 and e3 and e4 thenEveningStar = 1endif// 5 - Abandoned baby, aka Morning star ***********************// Bulkowski accuracy rate 70%, frequenc": lowa1 = high[1] < low[2] // gapa2 = high[1] < low[0] // gapa3 = abs(open[1]-close[1]) < ( range[1] / 2 ) // doji likeif a1 and a2 and a3 thenAbandonedBaby = 1endif// Results ******************if ThreeLineStrikeUp and ActiveThreeLineStrikeUp thensignal = 1elsif TwoBlackGappingDown and ActiveTwoBlackGappingDown thensignal = 2elsif ThreeBlackCrows and ActiveThreeBlackCrows thensignal = 3elsif EveningStar and ActiveEveningStar thensignal = 4elsif AbandonedBaby and ActiveAbandonedBaby thensignal = 5endif//// Pattern types//**************************//Type = Name of pattern//---- -------------------// 1 = ThreeLineStrikeUp// 2 = TwoBlackGappingDown// 3 = ThreeBlackCrows// 4 = EveningStar// 5 = AbandonedBaby//**************************//screener [ signal > 0 ] sort by signal as "Type"03/10/2021 at 5:48 PM #163741Merci Nicolas pour ta réactivité
donc si je ne veux que les étoiles du matin, il faut saisir ce paramétrage ?
ActiveThreeLineStrikeUp = 0
ActiveTwoBlackGappingDown = 0
ActiveThreeBlackCrows = 0
ActiveEveningStar = 0
ActiveAbandonedBaby = 1// —————————————
ThreeLineStrikeUp = 0
TwoBlackGappingDown = 0
ThreeBlackCrows = 0
EveningStar = 0
AbandonedBaby = 0signal = 0
-
AuthorPosts