PINE LIBRARY

HexworksSharedUtilities

42
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)

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.