Increases or decreases an existing position by the specified factor as of the next bar's open.
For instance:
broker.AdjustPositionOnOpen( 1.4 )
would increase a position by 40%, while
broker.AdjustPositionOnOpen( .8 )
would decrease the position by 20%.
Increasing a position size will result in adding units since the contract/share additions will have a different entry date than any of the existing units. Decreasing a position size will remove contracts/shares starting with the last unit on, and working back to the first if necessary.
This function is generally used by a Risk Manager Block to lighten a position to meet certain risk restrictions.
| Syntax: | 
|---|
| broker.AdjustPositionOnOpen( adjustmentFactor ) | 
| Parameter: | Description: | 
|---|---|
| adjustmentFactor | Factor by which the current position quantity will be multiplied. Result will determine position size after adjustmens have been processed. | 
| Returns: | 
|---|
| Example: | 
|---|
| ' Reduce the position size by our computed adjustment. | 
| Links: | 
|---|
| See Also: | 
| Edit Time: 9/7/2020 2:29:25 PM | Topic ID#: 133 |