Difference between revisions of "Pmms strategy close position partial"
Jump to navigation
Jump to search
Line 6: | Line 6: | ||
Where: | Where: | ||
:'''Index''' - numeric variable, strategy index. | :'''Index''' - numeric variable, strategy index. | ||
− | :'''isNextBar''' - | + | :'''isNextBar''' - boolean variable, true - generates open next bar order, false - generates close this bar order. |
:'''contracts''' - numeric variable, contracts number | :'''contracts''' - numeric variable, contracts number | ||
Revision as of 13:24, 10 April 2017
This function partially closes position of the specified strategy for the set number of contracts.
Usage
pmms_strategy_close_position_partial(Index, isNextBar, contracts)
Where:
- Index - numeric variable, strategy index.
- isNextBar - boolean variable, true - generates open next bar order, false - generates close this bar order.
- contracts - numeric variable, contracts number
Notes
This function can only be used in signals intended to be used with the Portfolio Trader.
Example
Reduce the position of the first symbol of the portfolio for 3 contracts at the next bar open.
pmms_strategy_close_position_partial(0, true, 3)