Author: willem01
Screen for Bear signals in My Portfolio
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
REM ProRealTime CandleStick BackTest REM (Position on My Vitual Portfolio LIST) REM Body Colors ********************************************************* REM whiteBody = (Close >= Open) blackBody = (Open > Close) REM Body Size (%) ********************************************************* REM smallBodyMaximum = 0.0025 REM LargeBodyMinimum = 0.01 REM smallBody = (Open >= Close *(1-smallBodyMaximum) AND whiteBody) OR (Close >= Open *(1-smallBodyMaximum) AND blackBody) REM largeBody = (Close >= Open *(1+largeBodyMinimum) AND whiteBody) OR Close <= Open *(1-largeBodyMinimum) AND blackBody REM mediumBody = NOT LargeBody AND NOT smallBody REM identicalBodies = ABS(ABS((Open [1])-(Close [1]))-ABS(Open - Close )) < ABS(Open - Close)*smallBodyMaximum REM realBodySize = ABS(Open - Close) REM Candle Definitions ********************************************************* REM spinningTop = mediumBody REM Doji = ABS(Close - Open ) <= (Close *smallBodyMaximum) OR ABS(Open - Close )<=((High - Low)*0.1) REM dojiStar = doji AND (GapUp OR GapDown)AND(LargeBody[1]) REM marabuzu = LargeBody AND smallUpperShadow AND smallLowerShadow REM (NOT largeBody AND smallLowerShadow AND LargeUpperShadow) OR*/ REM shootingStar = smallLowerShadow AND NOT doji AND ((blackBody AND ABS(Open -High)>2*realBodySize) OR whiteBody AND ABS( High - Close )>2*realBodySize) REM Hammer = smallUpperShadow AND NOT doji AND ((blackBody AND ABS(Close - Low )>2*realBodySize) OR (whiteBody AND ABS( Low - Open )>2*realBodySize)) REM tweezerTop = ABS(High -(High[1]))<= High * 0.0025 REM tweezerBottom = ABS(Low -(Low[1]))<= Low * 0.0025 REM Shadows ********************************************************* REM smallUpperShadow = (whiteBody AND High <= Close *(1+smallBodyMaximum)) OR (blackBody AND High <= Open *(1+smallBodyMaximum)) REM smallLowerShadow = (whiteBody AND Low >= Open *(1-smallBodyMaximum)) OR (blackBody AND Low >= Close *(1-smallBodyMaximum)) REM largeUpperShadow = (whiteBody AND High >= Close *(1+largeBodyMinimum)) OR (blackBody AND High >= Open *(1+largeBodyMinimum)) REM largeLowerShadow = (whiteBody AND Low <= Open *(1-largeBodyMinimum)) OR (blackBody AND Low <= Close *(1-largeBodyMinimum)) REM Gaps ********************************************************** REM GapUp REM GapUp = ((blackBody[1]) AND whiteBody AND Open > (Open [1])) OR ((blackbody[1]) AND blackBody AND Close >(Open [1])) OR ((whiteBody[1]) AND whiteBody AND Open > (Close [1])) OR ((whiteBody[1])AND blackBody AND Close >(Close [1])) REM GapDown REM GapDown = ((blackBody[1]) AND whiteBody AND Close <(Close [1])) OR ((blackbody[1]) AND blackBody AND Open <(Close [1])) OR ((whiteBody[1]) AND whiteBody AND Close <(Open [1])) OR ((whiteBody[1]) AND blackBody AND Open <(Open [1])) REM Engulfing ********************************************************** REM Engulfing = ((blackBody AND (blackbody[1]) AND Close <(Close [1]) AND Open >(Open [1]))) OR ((blackBody AND (whiteBody[1]) AND Open >(Close [1]) AND Close <(Open [1]))) OR ((whitebody AND (whitebody[1]) AND Close >(Close [1]) AND Open <(Open [1]))) OR ((whiteBody AND (blackBody[1])) AND Close >(Open [1]) AND Open <(Close [1])) REM Harami REM Harami = ((blackbody AND (blackBody[1]) AND Open <(Open [1]) AND Close >(Close [1]))) OR ((blackBody AND (whiteBody[1]) AND Close >(Open [1]) AND Open <(Close [1]))) OR ((whiteBody AND (whiteBody[1]) AND Close <(Close [1]) AND Open >(Open [1]))) OR ((whiteBody AND (blackBody[1]) AND Open >(Close [1]) AND Close <(Open [1]))) REM Maximum High Today - (MHT) Today is the maximum High in the last 5 days*/ REM MHT = HIGHEST[5](HIGH) REM Maximum High Yesterday - (MHY) Yesterday is the maximum High in the last 5 days*/ REM MHY = HIGHEST[5](HIGH[1]) REM Minimum Low Today - (MLT) Today is the minimum Low in the last 5 days*/ REM MLT = LOWEST[5](LOW) REM Minimum Low Yesterday - (MLY) Yesterday is the minimum Low in the last 5 days*/ REM MLY = LOWEST[5](LOW[1]) REM DOJI definitions ********************************************************** REM Doji Today - (DT)*/ REM DT = ABS(Close - Open) <= (Close * smallBodyMaximum) OR (ABS(Open - Close )<= (( High - Low )*0.1)) REM Doji Yesterday - (DY)*/ REM DY = ABS( ( Close[1])-(Open [1])) <= ( Close[1]) *smallBodyMaximum OR ABS ( ( Open[1])-(Close[1])) <= ( (High[1]) - (Low[1]))* 0.1 REM ********************************************************** REM BEARS REM ********************************************************** REM Identical three black crows*/ REM Patroon: Trendomkeer REM Trend: Bearish REM Betrouwbaarheid: Hoog REM Frequentie: Hoog idendicalThreeBlackCrows = (blackBody[2]) AND (blackBody[1]) AND blackBody SCREENER [idendicalThreeBlackCrows] |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :
Filename : download the ITF files
How to import ITF files into ProRealTime platform?
PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
thanks alot! the code is actually a very handy candlestick tool kit for creating any possible custom candle scanner. great work:)