PINE LIBRARY
fibonacci2

Library "fibonacci2"
Useful methods to calculate and display fibonacci retracement
modelParamsNew(point_0, point_1)
Parameters:
point_0 (chart.point)
point_1 (chart.point)
modelParamsNew(this, point_0, point_1)
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method toModelParams(this, point_0, point_1)
Namespace types: viewParams
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method createModel(params)
Namespace types: modelParams
Parameters:
params (modelParams)
method createView(this, params)
Namespace types: model
Parameters:
this (model)
params (viewParams)
method delete(view)
Namespace types: view
Parameters:
view (view)
levelModelParams
Fields:
level (series float)
levelViewParams
Fields:
level (series float)
color (series color)
line_width (series int)
line_style (series lineStyleEnum enum from Hamster-Coder/drawing/1)
levelModel
Represents a Fibonacci retracement level
Fields:
level (series float): The Fibonacci level ratio (e.g., 0.382, 0.5, 0.618)
value (series float): The Y-coordinate on the chart corresponding to this level
modelParams
Represents the full parameter set for the Fibonacci retracement model
Fields:
point_1 (chart.point): Coordinates of the anchor Point (1) of the model
point_0 (chart.point): Coordinates of the anchor Point (0) of the model
levels (array<levelModelParams>): List of levels to display for this model
model
Fields:
point_1 (chart.point)
point_0 (chart.point)
levels (array<levelModel>)
viewParams
Fields:
levels (array<levelViewParams>)
x1 (series int)
x2 (series int)
xloc (series string)
show_level_value (series bool)
value_format (series string)
force_overlay (series bool)
view
Fields:
model (model)
lines (array<line>)
labels (array<label>)
Useful methods to calculate and display fibonacci retracement
modelParamsNew(point_0, point_1)
Parameters:
point_0 (chart.point)
point_1 (chart.point)
modelParamsNew(this, point_0, point_1)
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method toModelParams(this, point_0, point_1)
Namespace types: viewParams
Parameters:
this (viewParams)
point_0 (chart.point)
point_1 (chart.point)
method createModel(params)
Namespace types: modelParams
Parameters:
params (modelParams)
method createView(this, params)
Namespace types: model
Parameters:
this (model)
params (viewParams)
method delete(view)
Namespace types: view
Parameters:
view (view)
levelModelParams
Fields:
level (series float)
levelViewParams
Fields:
level (series float)
color (series color)
line_width (series int)
line_style (series lineStyleEnum enum from Hamster-Coder/drawing/1)
levelModel
Represents a Fibonacci retracement level
Fields:
level (series float): The Fibonacci level ratio (e.g., 0.382, 0.5, 0.618)
value (series float): The Y-coordinate on the chart corresponding to this level
modelParams
Represents the full parameter set for the Fibonacci retracement model
Fields:
point_1 (chart.point): Coordinates of the anchor Point (1) of the model
point_0 (chart.point): Coordinates of the anchor Point (0) of the model
levels (array<levelModelParams>): List of levels to display for this model
model
Fields:
point_1 (chart.point)
point_0 (chart.point)
levels (array<levelModel>)
viewParams
Fields:
levels (array<levelViewParams>)
x1 (series int)
x2 (series int)
xloc (series string)
show_level_value (series bool)
value_format (series string)
force_overlay (series bool)
view
Fields:
model (model)
lines (array<line>)
labels (array<label>)
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
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.
Pine library
In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in publications is governed by House Rules.
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.