PINE LIBRARY
HexworksSharedUtilities

Library "HexworksSharedUtilities"
Shared global utilities that can be used for
- creating bounded queues from primitives
- checking visibility of objects having Bounds on both (x, y) axes
- checking if a line is too long
method offer(history, value)
Namespace types: FloatHistory
Parameters:
history (FloatHistory)
value (simple float)
method offer(history, value)
Namespace types: IntHistory
Parameters:
history (IntHistory)
value (simple int)
method offer(history, value)
Namespace types: StringHistory
Parameters:
history (StringHistory)
value (simple string)
method offer(history, value)
Namespace types: BoolHistory
Parameters:
history (BoolHistory)
value (simple bool)
method toString(point)
Namespace types: chart.point
Parameters:
point (chart.point)
method toString(num)
Namespace types: simple float, input float, const float
Parameters:
num (simple float)
method toString(num)
Namespace types: simple int, input int, const int
Parameters:
num (simple int)
method toString(value)
Namespace types: simple bool, input bool, const bool
Parameters:
value (simple bool)
method toString(l)
Namespace types: series line
Parameters:
l (line)
method isLineTooLong(fromPoint, toPoint)
Namespace types: chart.point
Parameters:
fromPoint (chart.point)
toPoint (chart.point)
method isTooLong(l)
Namespace types: series line
Parameters:
l (line)
createVisibilityChecker()
method update(v)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
method canDraw(v)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
method isVisible(v, b)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
b (Bounds)
FloatHistory
Fields:
history (array<float>)
maxLength (series int)
IntHistory
Fields:
history (array<int>)
maxLength (series int)
StringHistory
Fields:
history (array<string>)
maxLength (series int)
BoolHistory
Fields:
history (array<bool>)
maxLength (series int)
Bounds
Fields:
startIdx (series int)
endIdx (series int)
highValue (series float)
lowValue (series float)
VisibilityChecker
Fields:
leftVisibleBarIdx (series int)
rightVisibleBarIdx (series int)
maxDrawDistance (series int)
updatedAt (series int)
visibleHighest (series float)
visibleLowest (series float)
Shared global utilities that can be used for
- creating bounded queues from primitives
- checking visibility of objects having Bounds on both (x, y) axes
- checking if a line is too long
method offer(history, value)
Namespace types: FloatHistory
Parameters:
history (FloatHistory)
value (simple float)
method offer(history, value)
Namespace types: IntHistory
Parameters:
history (IntHistory)
value (simple int)
method offer(history, value)
Namespace types: StringHistory
Parameters:
history (StringHistory)
value (simple string)
method offer(history, value)
Namespace types: BoolHistory
Parameters:
history (BoolHistory)
value (simple bool)
method toString(point)
Namespace types: chart.point
Parameters:
point (chart.point)
method toString(num)
Namespace types: simple float, input float, const float
Parameters:
num (simple float)
method toString(num)
Namespace types: simple int, input int, const int
Parameters:
num (simple int)
method toString(value)
Namespace types: simple bool, input bool, const bool
Parameters:
value (simple bool)
method toString(l)
Namespace types: series line
Parameters:
l (line)
method isLineTooLong(fromPoint, toPoint)
Namespace types: chart.point
Parameters:
fromPoint (chart.point)
toPoint (chart.point)
method isTooLong(l)
Namespace types: series line
Parameters:
l (line)
createVisibilityChecker()
method update(v)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
method canDraw(v)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
method isVisible(v, b)
Namespace types: VisibilityChecker
Parameters:
v (VisibilityChecker)
b (Bounds)
FloatHistory
Fields:
history (array<float>)
maxLength (series int)
IntHistory
Fields:
history (array<int>)
maxLength (series int)
StringHistory
Fields:
history (array<string>)
maxLength (series int)
BoolHistory
Fields:
history (array<bool>)
maxLength (series int)
Bounds
Fields:
startIdx (series int)
endIdx (series int)
highValue (series float)
lowValue (series float)
VisibilityChecker
Fields:
leftVisibleBarIdx (series int)
rightVisibleBarIdx (series int)
maxDrawDistance (series int)
updatedAt (series int)
visibleHighest (series float)
visibleLowest (series float)
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.