Here we have a very simple indicator that shows the direction of the candles in the 1m/5m/15m/30m/1hr/4hr/1d/1w/1mt timeframes.
Important: the indicator only works on the smaller timeframe so if for example we use 30 minute candles then we must remove the lines of code for 1m/5m/15m
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 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 |
//PRC_CANDLE DIRECTION //version = 0 //15.02.24 //Iván González @ www.prorealcode.com //Sharing ProRealTime knowledge //Timeframe M1 / M5 / M15 / M30 / H1 / H4 / D1 / W1 / MN ////////////////////////////////////////////////////////// DEFPARAM DRAWONLASTBARONLY = TRUE timeframe (1mn) IF OPEN > CLOSE THEN RT1M = 255 GT1M = 0 BT1M = 0 ELSIF OPEN < CLOSE THEN RT1M = 0 GT1M = 255 BT1M = 0 ELSE RT1M = 125 GT1M = 125 BT1M = 125 ENDIF DRAWTEXT("⏹ 1MN",50, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT1M,GT1M,BT1M) timeframe (5mn) IF OPEN > CLOSE THEN RT5M = 255 GT5M = 0 BT5M = 0 ELSIF OPEN < CLOSE THEN RT5M = 0 GT5M = 255 BT5M = 0 ELSE RT5M = 125 GT5M = 125 BT5M = 125 ENDIF DRAWTEXT("⏹ 5MN",125, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT5M,GT5M,BT5M) timeframe (15mn) IF OPEN > CLOSE THEN RT15M = 255 GT15M = 0 BT15M = 0 ELSIF OPEN < CLOSE THEN RT15M = 0 GT15M = 255 BT15M = 0 ELSE RT15M = 125 GT15M = 125 BT15M = 125 ENDIF DRAWTEXT("⏹ 15MN",200, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT15M,GT15M,BT15M) timeframe (30mn) IF OPEN > CLOSE THEN RT30M = 255 GT30M = 0 BT30M = 0 ELSIF OPEN < CLOSE THEN RT30M = 0 GT30M = 255 BT30M = 0 ELSE RT30M = 125 GT30M = 125 BT30M = 125 ENDIF DRAWTEXT("⏹ 30MN",275, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT30M,GT30M,BT30M) timeframe (1H) IF OPEN > CLOSE THEN RT1H = 255 GT1H = 0 BT1H = 0 ELSIF OPEN < CLOSE THEN RT1H = 0 GT1H = 255 BT1H = 0 ELSE RT1H = 125 GT1H = 125 BT1H = 125 ENDIF DRAWTEXT("⏹ 1HR",350, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT1H,GT1H,BT1H) timeframe (4H) IF OPEN > CLOSE THEN RT4H = 255 GT4H = 0 BT4H = 0 ELSIF OPEN < CLOSE THEN RT4H = 0 GT4H = 255 BT4H = 0 ELSE RT4H = 125 GT4H = 125 BT4H = 125 ENDIF DRAWTEXT("⏹ 4HR",425, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT4H,GT4H,BT4H) timeframe (DAILY) IF OPEN > CLOSE THEN RT1D = 255 GT1D = 0 BT1D = 0 ELSIF OPEN < CLOSE THEN RT1D = 0 GT1D = 255 BT1D = 0 ELSE RT1D = 125 GT1D = 125 BT1D = 125 ENDIF DRAWTEXT("⏹ 1D",500, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT1D,GT1D,BT1D) timeframe (WEEKLY) IF OPEN > CLOSE THEN RT1W = 255 GT1W = 0 BT1W = 0 ELSIF OPEN < CLOSE THEN RT1W = 0 GT1W = 255 BT1W = 0 ELSE RT1W = 125 GT1W = 125 BT1W = 125 ENDIF DRAWTEXT("⏹ 1W",575, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT1W,GT1W,BT1W) timeframe (MONTHLY) IF OPEN > CLOSE THEN RT1MT = 255 GT1MT = 0 BT1MT = 0 ELSIF OPEN < CLOSE THEN RT1MT = 0 GT1MT = 255 BT1MT = 0 ELSE RT1MT= 125 GT1MT = 125 BT1MT = 125 ENDIF DRAWTEXT("⏹ 1M",650, -100)ANCHOR(TOPLEFT,XSHIFT,YSHIFT)coloured(RT1MT,GT1MT,BT1MT) RETURN |
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