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