This educational script contains different examples regarding lines, linefill, labels & boxes
First part shows the use of array.new<linefill>() without first retrieving line.new() which then are put in a linefill.new()
At every start of the week a linefill.new() is added with the top line being previous Weekly high, and the bottom line being previous Weekly low, if close doesn't go above top line, or below bottom line, both lines will be made longer with 1 bar_index (line.set_x2), otherwise the lines stop, and change color
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publications is governed by House rules. You can favorite it to use it on a chart.
- We cannot control our emotions,
but we can control our keyboard -
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.