This indicator simply plots on the chart the nearest rounded levels to the last close level.
The parameter “level” is a decimal so it can be used for forex rounded levels too.
The parameter “skip” indicates how many extra ceils and floors you want to plot above and below the last close price.
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 |
once floor = close once ceil = close price = close[1] if price < floor or price > ceil then frac = price/level rounded = round(frac) // computing floor and ceil (functions are not available in v10.3) if rounded > frac then ceil = rounded * level floor = (rounded-1) * level else floor = rounded * level ceil = (rounded+1) * level endif endif // Choose one of these chars (see https://en.wikipedia.org/wiki/Dash): // ― - — ― ‒ // ~ ∼ ➖ ⁃ ✛ // • ● ○ ∙ ◦ IBar = barindex for skip = 0 to skips do skipSize = skip*level ceilLev = ceil + skipSize floorLev = floor - skipSize drawtext("◦", IBar, ceilLev, Dialog, Standard, 10) //coloured (255, 0, 0, 255) drawtext("◦", IBar, floorLev, Dialog, Standard, 10) //coloured (0, 128, 0, 255) next 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