Difference between revisions of "Dollar Trailing LX"
(Created page with "=== Definition=== The Dollar Trailing strategy a built-in PowerLanguage stop keyword (SetStopPosition or SetStopShare) to place an order to exit all shares or contra...") |
|||
Line 1: | Line 1: | ||
=== Definition=== | === Definition=== | ||
− | The Dollar Trailing strategy a built-in PowerLanguage stop keyword ([[SetStopPosition]] or [[SetStopShare]]) to place an order to exit all shares or contracts in all positions, once the position has retraced a specified dollar amount of the position's highest profit value. The retracement or trailing amount can be specified on a total position basis/one contract/one share basis. Whether the profit target amount is based on a position or per share/contract basis is determined by the PositionBasis input.<br> | + | The Dollar Trailing strategy uses a built-in PowerLanguage stop keyword ([[SetStopPosition]] or [[SetStopShare]]) to place an order to exit all shares or contracts in all positions, once the position has retraced a specified dollar amount of the position's highest profit value. The retracement or trailing amount can be specified on a total position basis/one contract/one share basis. Whether the profit target amount is based on a position or per share/contract basis is determined by the PositionBasis input.<br> |
<br> | <br> | ||
Latest revision as of 15:39, 13 September 2021
Definition
The Dollar Trailing strategy uses a built-in PowerLanguage stop keyword (SetStopPosition or SetStopShare) to place an order to exit all shares or contracts in all positions, once the position has retraced a specified dollar amount of the position's highest profit value. The retracement or trailing amount can be specified on a total position basis/one contract/one share basis. Whether the profit target amount is based on a position or per share/contract basis is determined by the PositionBasis input.
The Dollar Trailing LX strategy is used to set a trailing stop to exit a long position when prices move down a specified number of dollars (in terms of either a total position or share/contract amount) from the highest price since entry. This strategy uses a built-in stop that will exit within any bar (except the bar of entry) whenever the trailing stop amount is reached.
This strategy will only generate an exit on a long position. Use Dollar Trailing SX for exiting from a short position.
Default Inputs
Amount sets loss amount (in USD) from the highest entry price at which point the position will be closed, 1 by default.
PositionBasis sets whether the breakeven floor is calculated on a position or per share basis, false by default. To calculate profit per position, enter true.