Entry orders are rejected based on violations of threshold values for each of the group risk sections enabled.
Group Risk Manager Parameters:

Parameters:
|
Descriptions:
|
Use Risk
|
True enables Max Group Risk parameters.
|
Max Group Long Risk %
|
Max risk for Long instruments in the group.
|
Max Group Short Risk %
|
Max risk for Short instruments in the group.
|
Use Units
|
True enables Max number of Long and Short Group Units.
|
Max Group Long Units
|
Max number of Long units in the group.
|
Max Group Short Units
|
Max number of Short units in the group.
|
Use Quantity
|
True enables Max number of Long and Short Group positions.
|
Max Group Long Quantity
|
Max quantity of Long positions.
|
Max Group Short Quantity
|
Max quantity of Short positions.
|
Group Risk Limiter Control Logic - CAN ADD UNIT:
|
' ==============================================================
' Group Risk Manager
' CAN ADD UNIT SCRIPT - START
' ==============================================================
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' LONG Order Filtering Logic
' --------------------------------------------------------------
' Check the long positions in this group to see if we can add a new unit
If order.position = LONG AND
( ( useRisk AND instrument.groupLongRisk >= maxLongRisk * system.tradingEquity ) OR
( useUnits AND instrument.groupLongUnits >= maxLongUnits ) OR
( useQuantity AND instrument.groupLongQuantity >= maxLongQuantity ) ) THEN
order.Reject( "Long group risk greater than maximum" )
ENDIF
' --------------------------------------------------------------
' SHORT Order Filtering Logic
' --------------------------------------------------------------
' Check the short positions in this group to see if we can add a new unit
If order.position = SHORT AND
( ( useRisk AND instrument.groupShortRisk >= maxShortRisk * system.tradingEquity ) OR
( useUnits AND instrument.groupShortUnits >= maxShortUnits ) OR
( useQuantity AND instrument.groupShortQuantity >= maxShortQuantity ) ) THEN
order.Reject( "Short group risk greater than maximum" )
ENDIF
' ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
' ==============================================================
' CAN ADD UNIT - END
' Group Risk Manager
' ==============================================================
|
Edit Time: 9/12/2020 9:50:00 AM
|
|
Topic ID#: 153
|