Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © finallynitin
- //@version=5
- indicator('10 Day High', overlay=true)
- length = input.int(10, minval=1)
- upper = ta.highest(length)
- u = plot(upper, "Upper", color=#2962FF)
- // -----------------------LABEL------------------------
- DH = (close - upper) * 100 / close
- label lbl_0 = label.new(bar_index, upper, xloc=xloc.bar_index, text=str.tostring(DH, '#.#') + '%', color=DH >= -5 ? color.green : color.red, style=label.style_label_left, textcolor=color.white, size=size.normal, textalign=text.align_left)
- label.set_x(lbl_0, bar_index[0])
- label.delete(lbl_0[1])
- // -----------------------WMA------------------------
- WMA10 = ta.wma(close, 10)
- WMA20 = ta.wma(close, 20)
- WMA50 = ta.wma(close, 50)
- WMA100 = ta.wma(close, 100)
- WMA200 = ta.wma(close, 200)
- plot(WMA10, color=color.green, title="WMA10")
- plot(WMA20, color=color.red, title="WMA20")
- plot(WMA50, color=color.black, title="WMA50")
- plot(WMA100, color=color.aqua, title="WMA100")
- plot(WMA200, color=color.purple, title="WMA200")
Advertisement
Add Comment
Please, Sign In to add comment