PINE LIBRARY
Actualizado

ToolsPos

170
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
Notas de prensa
v2

Added:
method enter(this, state, price, when, index, info)
  modifies PosInfo object for new position entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    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
    info (Fluent type from aybarsm/ToolsFluent/3): <Fluent> Info holder fluent object. Default: na

method action(this, type, price, when, index, info)
  modifies PosInfo object for action take-profit/re-entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    type (series PosActionType): <PosActionType> Pos ActionType
    price (float): float Action price
    when (int): int Action bar time UNIX. Default: time
    index (int): int Action bar index. Default: bar_index
    info (Fluent type from aybarsm/ToolsFluent/3): <Fluent> Info holder fluent object. Default: na

PosAction
  PosTPInfo - Position Take Profit info object
  Fields:
    type (series PosActionType)
    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 (Fluent type from aybarsm/ToolsFluent/3)

Updated:
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<PosAction>): PosAction[] Take profit info. Default: na
    re (array<PosAction>): PosAction[] Re-entry info. Default: na
    info (Fluent type from aybarsm/ToolsFluent/3): <Fluent> Info holder fluent object. Default: na

Removed:
new_pos(state, price, when, index)
  Returns new PosInfo object

new_tp(pos, price, when, index, info)
  Returns PosInfo object with new take profit info object

new_re(pos, price, when, index, info)
  Returns PosInfo object with new re-entry info object

PosTPInfo
  PosTPInfo - Position Take Profit info object

PosREInfo
  PosREInfo - Position Re-Entry info object
Notas de prensa
v3

Updated:
method action(this, actionType, price, when, index, info)
  modifies PosInfo object for action take-profit/re-entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    actionType (series PosActionType)
    price (float): float Action price
    when (int): int Action bar time UNIX. Default: time
    index (int): int Action bar index. Default: bar_index
    info (Fluent type from aybarsm/ToolsFluent/3): <Fluent> Info holder fluent object. Default: na
Notas de prensa
v4

Updated:
PosInfo
  PosInfo - Position info object
  Fields:
    state (series PosState): <PosState> Position state. Default: na
    price (series float): float Entry price. Default: na
    when (series int): int Entry bar time UNIX. Default: time
    index (series int): int Entry bar index. Default: bar_index
    tp (array<PosAction>): PosAction[] Take profit info. Default: na
    re (array<PosAction>): PosAction[] Re-entry info. Default: na
    info (Fluent type from aybarsm/ToolsFluent/3): <Fluent> Info holder fluent object. Default: na
Notas de prensa
v5
Notas de prensa
v6

Updated:
method enter(this, state, price, when, index, info)
  modifies PosInfo object for new position entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    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
    info (Fluent type from aybarsm/ToolsFluent/4): <Fluent> Info holder fluent object. Default: na

method action(this, actionType, price, when, index, info)
  modifies PosInfo object for action take-profit/re-entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    actionType (series PosActionType)
    price (float): float Action price
    when (int): int Action bar time UNIX. Default: time
    index (int): int Action bar index. Default: bar_index
    info (Fluent type from aybarsm/ToolsFluent/4): <Fluent> Info holder fluent object. Default: na

PosAction
  PosTPInfo - Position Take Profit info object
  Fields:
    type (series PosActionType)
    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 (Fluent type from aybarsm/ToolsFluent/4)

PosInfo
  PosInfo - Position info object
  Fields:
    state (series PosState): <PosState> Position state. Default: na
    price (series float): float Entry price. Default: na
    when (series int): int Entry bar time UNIX. Default: time
    index (series int): int Entry bar index. Default: bar_index
    tp (array<PosAction>): PosAction[] Take profit info. Default: na
    re (array<PosAction>): PosAction[] Re-entry info. Default: na
    info (Fluent type from aybarsm/ToolsFluent/4): <Fluent> Info holder fluent object. Default: na
Notas de prensa
v7

Updated:
method enter(this, state, price, when, index, info)
  modifies PosInfo object for new position entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    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
    info (Fluent type from aybarsm/ToolsFluent/6): <Fluent> Info holder fluent object. Default: na

method action(this, actionType, price, when, index, info)
  modifies PosInfo object for action take-profit/re-entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    actionType (series PosActionType)
    price (float): float Action price
    when (int): int Action bar time UNIX. Default: time
    index (int): int Action bar index. Default: bar_index
    info (Fluent type from aybarsm/ToolsFluent/6): <Fluent> Info holder fluent object. Default: na

PosAction
  PosTPInfo - Position Take Profit info object
  Fields:
    type (series PosActionType)
    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 (Fluent type from aybarsm/ToolsFluent/6)

PosInfo
  PosInfo - Position info object
  Fields:
    state (series PosState): <PosState> Position state. Default: na
    price (series float): float Entry price. Default: na
    when (series int): int Entry bar time UNIX. Default: time
    index (series int): int Entry bar index. Default: bar_index
    tp (array<PosAction>): PosAction[] Take profit info. Default: na
    re (array<PosAction>): PosAction[] Re-entry info. Default: na
    info (Fluent type from aybarsm/ToolsFluent/6): <Fluent> Info holder fluent object. Default: na
Notas de prensa
v8

Updated:
PosAction
  PosTPInfo - Position Take Profit info object
  Fields:
    actionType (series PosActionType)
    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 (Fluent type from aybarsm/ToolsFluent/6)
Notas de prensa
v9

Updated:
method enter(this, state, price, when, index, markPrice, markWhen, markIndex)
  modifies PosInfo object for new position entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    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
    markPrice (float): float Mark price. Default: na
    markWhen (int): int Mark bar time UNIX. Default: na
    markIndex (int): int Mark bar index. Default: na

method action(this, actionType, price, when, index, markPrice, markWhen, markIndex)
  modifies PosInfo object for action take-profit/re-entry
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)
    actionType (series PosActionType)
    price (float): float Action price
    when (int): int Action bar time UNIX. Default: time
    index (int): int Action bar index. Default: bar_index
    markPrice (float): float Mark price. Default: na
    markWhen (int): int Mark bar time UNIX. Default: na
    markIndex (int): int Mark bar index. Default: na

PosAction
  PosTPInfo - Position Action info object
  Fields:
    actionType (series PosActionType)
    price (series float): float Action price
    when (series int): int Action bar time UNIX. Default: time
    index (series int): int Action bar index. Default: bar_index
    markPrice (series float): float Action mark price. Default: na
    markWhen (series int): int Action mark bar time UNIX. Default: na
    markIndex (series int): int Action mark bar index. Default: na

PosInfo
  PosInfo - Position info object
  Fields:
    state (series PosState): <PosState> Position state. Default: na
    price (series float): float Entry price. Default: na
    when (series int): int Entry bar time UNIX. Default: time
    index (series int): int Entry bar index. Default: bar_index
    tp (array<PosAction>): PosAction[] Take profit info. Default: na
    re (array<PosAction>): PosAction[] Re-entry info. Default: na
    markPrice (series float): float Mark price. Default: na
    markWhen (series int): int Mark bar time UNIX. Default: na
    markIndex (series int): int Mark bar index. Default: na
Notas de prensa
v10

Added:
method reset(this)
  resets PosInfo object exit
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)

method exit(this)
  resets PosInfo object exit
  Namespace types: PosInfo
  Parameters:
    this (PosInfo)

Exención de responsabilidad

La información y las publicaciones que ofrecemos, no implican ni constituyen un asesoramiento financiero, ni de inversión, trading o cualquier otro tipo de consejo o recomendación emitida o respaldada por TradingView. Puede obtener información adicional en las Condiciones de uso.