PINE LIBRARY

ToolsPos

146
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

Clause de non-responsabilité

Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.