Created
December 17, 2022 18:15
-
-
Save iCodeForBananas/b5bfbd0c434285446b36aebcd10818b9 to your computer and use it in GitHub Desktop.
horizontal lines on trading view
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //@version=5 | |
| indicator("Horizontal Lines", overlay=true) | |
| lineColor = input(title="Line color", defval = color.new(color.blue, 50)) | |
| selectedprice = input.float(title="Starting price", defval=4000) | |
| lineInterval = input(title="Line interval", defval=5) | |
| for i = 0 to 25 | |
| line.new(bar_index, selectedprice+(lineInterval*i), bar_index-1, selectedprice+(lineInterval*i), extend=extend.both, color=lineColor, style=line.style_solid, width=1) | |
| line.new(bar_index, selectedprice-(lineInterval*i), bar_index-1, selectedprice-(lineInterval*i), extend=extend.both, color=lineColor, style=line.style_solid, width=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment