Gtr77

Gtr77

//@version=5
indicator("Fibonacci Retracement", overlay=true)

highPrice = ta.highest(high, 50)
lowPrice = ta.lowest(low, 50)

fibLevels = array.new_float()
array.push(fibLevels, 0.236)
array.push(fibLevels, 0.382)
array.push(fibLevels, 0.5)
array.push(fibLevels, 0.618)
array.push(fibLevels, 0.786)

for level in fibLevels
fibPrice = lowPrice + (highPrice - lowPrice) * level
line.new(bar_index - 50, fibPrice, bar_index, fibPrice, color=color.blue, width=1)

Read More

Share:

Latest News