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/
- // © blackcat1402
- //@version=4
- study("[blackcat] L1 Fibonacci VWAP RSI Indicator", overlay=false, max_bars_back=5000, max_labels_count=500)
- //inputs
- LookbackLength = input(400, title = "LookbackLength")
- RSILength = input(14, title = "RSILength")
- Fib1 = input(23.6, title = "Fib1")
- Fib2 = input(31.1, title = "Fib2")
- Fib3 = input(100, title = "Fib3")
- //vars
- RawVWAPRSI = 0.00
- RangeHigh = 0.00
- RangeLow = 100.00
- ChartRange = 0.00
- Trendline1 = 0.00
- Trendline2 = 0.00
- Trendline3 = 0.00
- inp = input(hl2)
- RawVWAPRSI := rsi(vwap(inp), RSILength )
- if bar_index > LookbackLength
- RangeHigh := highest(RawVWAPRSI,LookbackLength )
- RangeLow := lowest(RawVWAPRSI, LookbackLength )
- ChartRange := RangeHigh - RangeLow
- Trendline1 := Fib1/100*ChartRange + RangeLow
- Trendline2 := Fib2/100*ChartRange + RangeLow
- Trendline3 := Fib3/100*ChartRange + RangeLow
- Plot1 =plot( bar_index > LookbackLength ? RawVWAPRSI : na , color= RawVWAPRSI > RawVWAPRSI[1] ? color.yellow : color.fuchsia, linewidth = 2)
- Plot2 = plot( bar_index > LookbackLength ? RangeLow + ChartRange / 2 : na, color=color.white )
- Plot3 = plot( bar_index > LookbackLength ? Trendline1 : na, color=color.green )
- Plot4 = plot( bar_index > LookbackLength ? Trendline2 : na, color=color.blue )
- Plot5 = plot( bar_index > LookbackLength ? Trendline3 : na, color=color.red )
Advertisement
Add Comment
Please, Sign In to add comment