Increases or decreases an existing position by the specified factor if the market  trades through the limit price. See: AdjustPositionOnOpen for a more complete description of the adjustment factor.

 

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, or by an Exit Block to take profits on a portion of a position at a specified profit target.

 

Syntax:

'  Change the positions quantity using the adjustment percent

'  when limit price is traded through.
broker.AdjustPositionAtLimit([symbol], adjustmentPercent, limitPrice )

 

Parameter:

Description:

[symbol]

Symbol is optional when intended broker order is for the instrument naturally in context.

adjustmentPercent

Percentage rate multiplier applied the existing position quantity to determine new position size.

limitPrice

Trade through limit price required to change position size.

 

Returns:

Adjust Position will add a unit when percentage factor increases position quantity, and it will reduce units greater than one unit when reducing position quantity.

 

Example:

' Take profits on a portion of our position at our target.
broker.AdjustPositionAtLimit( riskAdjustment, profitTarget )

 

Links:

Broker

See Also:

AdjustPositionOnOpen

 


 

Created with Help & Manual 7 and styled with Premium Pack Version 2.80 © by EC Software