Price Action Tools
This program is primarily intended for investors trading primarily with price action using the minimum for better efficiency.
Without the use of superfluous indicators these simple lines of code allow:
– Automatic detection of Fibonacci levels with correct alignment orientation
– Visualization of the highest and lowest of the current session or of a previous day selectable form continuous line or a rectangle with partly adjustable width and
– The Opening level of the active session …
In the chapter of the variables it is possible to intervene on the properties allowing
– “Grid” to select a particular “area” that you want to view between two levels of Fibonacci or let the program do it automatically (0)
– “XOffset” to manually set the width of the rectangle covering this selected area
– “Alpha” to adjust the transparency of the text at your convenience
– “SetBar” to act on the width of the rectangle covering the lines “higher and lower”
– “NDay” to select the active session (0) or the previous days (1 yesterday, 2 before yesterday, ect …)
– “HLine” Check visualization lines “up, down” selection by “NDay” or rectangle plus the opening level
For any questions about the program “Price Action Tools” please make your request here ► https://www.prorealcode.com/topic/price-action-tools/
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 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 |
// Price Action Tools | Indicator // 25.05.2019 (Release 1.0) // Swapping @ www.forexswap.fr // Sharing ProRealTime knowledge DefParam DrawOnLastBarOnly = true // --- Property settings Grid = 0 // Select Area between Fibonacci levels (0 = automatic) XOffset = 10 // Text XOffset Alpha = 12 // Text Transparency SetBar = 0 // Width adjustment rectangle NDay = 0 // Choice Day (0 = today, 1 = yesterday) HLine = 1 // Check (0 = Box, 1 = DrawHLine) // --- end // --- init XOffset = max(2,XOffset) alpha = max(alpha,0) // Limited input "Alpha" alpha = min(alpha,255) // (0 min, 255 max) NDay = max(NDay,0) // Limited input "Day" NDay = min(NDay,31) // (0 today, 31 end of month) // --- end if day <> day[1] then startbar = BarIndex endif HiDay = dhigh(NDay) LowDay = dlow(NDay) if HLine = 1 then DrawHline(HiDay) coloured(40,140,190,255) // Upper Top Line DrawHline(LowDay) coloured(40,140,190,255) // Lower Low Line DrawText("Open ► ",startbar,dopen(0),SansSerif,Bold,11) coloured(40,140,190,alpha) DrawSegment(startbar,dopen(0),barindex,dopen(0)) coloured(40,140,190) else DrawRectangle(startbar,HiDay,BarIndex-SetBar,LowDay) coloured(40,140,200,10) // Rectangle endif if low > fib50 then // Bullish sense fib100 = DHigh(0) //100% DrawText("Top Day ",BarIndex-XOffset-3,fib100,SansSerif,Bold,10) coloured(20,140,0,alpha) DrawSegment(BarIndex[XOffset-2],fib100,BarIndex,fib100) coloured(0,0,0,alpha) fib76 = (fib100-fib0)*.764+fib0 //76.4% DrawText("76.4% ",BarIndex-XOffset,fib76,SansSerif,Standard,10) coloured(20,140,0,alpha) fib62 = (fib100-fib0)*.618+fib0 //61.8% DrawText("61.8% ",BarIndex-XOffset,fib62,SansSerif,Standard,10) coloured(20,140,0,alpha) fib50 = (fib100-fib0)/2+fib0 //50% DrawText("50.0% ",BarIndex-XOffset,fib50,SansSerif,Standard,10) coloured(20,140,0,alpha) fib38 = (fib100-fib0)*.382+fib0 //38.2% DrawText("38.2% ",BarIndex-XOffset,fib38,SansSerif,Standard,10) coloured(20,140,0,alpha) fib24 = (fib100-fib0)*.236+fib0 //23.6% DrawText("23.6% ",BarIndex-XOffset,fib24,SansSerif,Standard,10) coloured(20,140,0,alpha) fib0 = DLow(0) //0% DrawText("0% ",BarIndex-XOffset,fib0,SansSerif,Standard,10) coloured(20,140,0,alpha) DrawSegment(BarIndex[XOffset-2],fib0,BarIndex,fib0) coloured(0,0,0,alpha) endif if high < fib50 then // Bearish sense fib100 = DHigh(0) //0% DrawText("Low Day ",BarIndex-XOffset-3,fib0,SansSerif,Bold,10) coloured(190,10,10,alpha) DrawSegment(BarIndex[XOffset-2],fib0,BarIndex,fib0) coloured(0,0,0,alpha) fib76 = (fib100-fib0)*.764+fib0 //23.6% DrawText("23.6% ",BarIndex-XOffset,fib76,SansSerif,Standard,10) coloured(190,10,10,alpha) fib62 = (fib100-fib0)*.618+fib0 //38.2% DrawText("38.2% ",BarIndex-XOffset,fib62,SansSerif,Standard,10) coloured(190,10,10,alpha) fib50 = (fib100-fib0)*.5+fib0 //50% DrawText("50.0% ",BarIndex-XOffset,fib50,SansSerif,Standard,10) coloured(190,10,10,alpha) fib38 = (fib100-fib0)*.382+fib0 //61.8% DrawText("61.8% ",BarIndex-XOffset,fib38,SansSerif,Standard,10) coloured(190,10,10,alpha) fib24 = (fib100-fib0)*.236+fib0 //76.4% DrawText("76.4% ",BarIndex-XOffset,fib24,SansSerif,Standard,10) coloured(190,10,10,alpha) fib0 = DLow(0) //100% DrawText("0% ",BarIndex-XOffset,fib100,SansSerif,Standard,10) coloured(190,10,10,alpha) DrawSegment(BarIndex[XOffset-2],fib100,BarIndex,fib100) coloured(0,0,0,alpha) endif //------------------------------------------------- // Check Box Selected Manual Area [1 to 14] if grid = 1 and low > fib50 then // area 0-23.6 DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib24) coloured(0,0,0,0) elsif grid = 1 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib24) coloured(0,0,0,0) endif if grid = 2 and low > fib50 then // area 23.6-38.2 DrawRectangle(BarIndex-XOffset,fib24,BarIndex[0],fib38) coloured(0,0,0,0) elsif grid = 2 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib24,BarIndex[0],fib38) coloured(0,0,0,0) endif if grid = 3 and low > fib50 then // area 38.2-50.0 DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib50) coloured(0,0,0,0) elsif grid = 3 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib50) coloured(0,0,0,0) endif if grid = 4 and low > fib50 then // area 50.0-61.8 DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib62) coloured(0,0,0,0) elsif grid = 4 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib62) coloured(0,0,0,0) endif if grid = 5 and low > fib50 then // area 61.8-76.4 DrawRectangle(BarIndex-XOffset,fib62,BarIndex[0],fib76) coloured(0,0,0,0) elsif grid = 5 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib62,BarIndex[0],fib76) coloured(0,0,0,0) endif if grid = 6 and low > fib50 then // area 76.4-100 DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib100) coloured(0,0,0,0) elsif grid = 6 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib100) coloured(0,0,0,0) endif if grid = 7 and low > fib50 then // area 100-61.8 DrawRectangle(BarIndex-XOffset,fib100,BarIndex[0],fib62) coloured(0,0,0,0) elsif grid = 7 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib100,BarIndex[0],fib62) coloured(0,0,0,0) endif if grid = 8 and low > fib50 then // area 76.4-50.0 DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib50) coloured(0,0,0,0) elsif grid = 8 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib50) coloured(0,0,0,0) endif if grid = 9 and low > fib50 then // area 61.8-38.2 DrawRectangle(BarIndex-XOffset,fib62,BarIndex[0],fib38) coloured(0,0,0,0) elsif grid = 9 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib62,BarIndex[0],fib38) coloured(0,0,0,0) endif if grid = 10 and low > fib50 then // area 50.0-23.6 DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib24) coloured(0,0,0,0) elsif grid = 10 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib24) coloured(0,0,0,0) endif if grid = 11 and low > fib50 then // area 38.26-0 DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib0) coloured(0,0,0,0) elsif grid = 11 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib0) coloured(0,0,0,0) endif if grid = 12 and low > fib50 then // area 50.0-100 DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib100) coloured(0,0,0,0) elsif grid = 12 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib100) coloured(0,0,0,0) endif if grid = 13 and low > fib50 then // area 50.0-0 DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib50) coloured(0,0,0,0) elsif grid = 13 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib50) coloured(0,0,0,0) endif if grid = 14 and low > fib50 then // area 0-100 DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib100) coloured(0,0,0,0) elsif grid = 14 and low < fib50 then DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib100) coloured(0,0,0,0) endif //------------------------------------------------- // Check Box Selected Automatic Area [0] bull/bear if grid = 0 and low > fib50 and close > fib0 and close < fib24 then // area 0-23.6 DrawRectangle(BarIndex-XOffset,fib0,BarIndex[0],fib24) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib0 and close < fib24 then // bear DrawRectangle(BarIndex-XOffset,fib24,BarIndex[0],fib0) coloured(0,0,0,0) endif if grid = 0 and low > fib50 and close > fib24 and close < fib38 then // area 23.6-38.2 DrawRectangle(BarIndex-XOffset,fib24,BarIndex[0],fib38) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib24 and close < fib38 then // bear DrawRectangle(BarIndex-XOffset,fib24,BarIndex[0],fib38) coloured(0,0,0,0) endif if grid = 0 and low > fib50 and close > fib38 and close < fib50 then // area 38.2-50.0 DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib50) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib38 and close < fib50 then // bear DrawRectangle(BarIndex-XOffset,fib38,BarIndex[0],fib50) coloured(0,0,0,0) endif if grid = 0 and low > fib50 and close > fib50 and close < fib62 then // area 50.0-61.8 DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib62) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib50 and close < fib62 then // bear DrawRectangle(BarIndex-XOffset,fib50,BarIndex[0],fib62) coloured(0,0,0,0) endif if grid = 0 and low > fib50 and close > fib62 and close < fib76 then // area 61.8-76.4 DrawRectangle(BarIndex-XOffset,fib62,BarIndex[0],fib76) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib76 and close < fib100 then // bear DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib100) coloured(0,0,0,0) endif if grid = 0 and low > fib50 and close > fib76 and close < fib100 then // area 76.4-100 DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib100) coloured(0,0,0,0) elsif grid = 0 and high < fib50 and close > fib76 and close < fib100 then // bear DrawRectangle(BarIndex-XOffset,fib76,BarIndex[0],fib100) coloured(0,0,0,0) endif 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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
when I put the indicator does not put it on the price, sn in a new box like many indicators. How do I open it in the price window?
by adding it on price instead. Use the wrench on the left upper side of your price chart.