Lipi Reference
Lipi

Constants

math.phi

The golden ratio: the positive number whose square is one greater than itself. The contract records this constant's name and type only, so this edition does not print its value.

Example


          //@lipi=2
indicator("math.phi Example", overlay=true)
// A level at the golden ratio of the 50-bar range
hi = talib.highest(high, 50)
lo = talib.lowest(low, 50)
plot(lo + (hi - lo) / math.phi, title="Golden Ratio Level", color=color.orange)
        

Type

const float