PINE LIBRARY

ToolsPos

Library "ToolsPos"
Library for general purpose position helpers

new_pos(state, price, when, index)
  Returns new PosInfo object
  Parameters:
    state (series PosState): <PosState> Position state
    price (float): float Entry price
    when (int): int Entry bar time UNIX. Default: time
    index (int): int Entry bar index. Default: bar_index
  Returns: PosInfo

new_tp(pos, price, when, index, info)
  Returns PosInfo object with new take profit info object
  Parameters:
    pos (PosInfo): PosInfo object
    price (float): float Entry price
    when (int): int Entry bar time UNIX. Default: time
    index (int): int Entry bar index. Default: bar_index
    info (Info type from aybarsm/Tools/14): <Info> Info holder object. Default: na
  Returns: PosInfo

new_re(pos, price, when, index, info)
  Returns PosInfo object with new re-entry info object
  Parameters:
    pos (PosInfo): PosInfo object
    price (float): float Entry price
    when (int): int Entry bar time UNIX. Default: time
    index (int): int Entry bar index. Default: bar_index
    info (Info type from aybarsm/Tools/14): <Info> Info holder object. Default: na
  Returns: PosInfo

PosTPInfo
  PosTPInfo - Position Take Profit info object
  Fields:
    price (series float): float Take profit price
    when (series int): int Take profit bar time UNIX. Default: time
    index (series int): int Take profit bar index. Default: bar_index
    info (Info type from aybarsm/Tools/14): <Info> Info holder object

PosREInfo
  PosREInfo - Position Re-Entry info object
  Fields:
    price (series float): float Re-entry price
    when (series int): int Re-entry bar time UNIX. Default: time
    index (series int): int Take profit bar index. Default: bar_index
    info (Info type from aybarsm/Tools/14): <Info> Info holder object

PosInfo
  PosInfo - Position info object
  Fields:
    state (series PosState): <PosState> Position state
    price (series float): float Entry price
    when (series int): int Entry bar time UNIX. Default: time
    index (series int): int Entry bar index. Default: bar_index
    tp (array<PosTPInfo>): PosTPInfo[] Take profit info. Default: na
    re (array<PosREInfo>): PosREInfo[] Re-entry info. Default: na
    info (Info type from aybarsm/Tools/14): <Info> Info holder object
formatting

Biblioteka Pine

W prawdziwym duchu TradingView autor opublikował ten kod Pine jako bibliotekę typu open source, aby inni programiści Pine z naszej społeczności mogli go ponownie wykorzystać. Pozdrowienia dla autora! Możesz używać tej biblioteki prywatnie lub w innych publikacjach typu open source, ale ponowne użycie tego kodu w publikacji podlega Zasadom Regulaminu.


Również na:

Wyłączenie odpowiedzialności