Called once for each instrument which has an existing position after the Initialize Risk Management script has been called, the Compute Instrument Risk script can be used to compute per-instrument risk and to total the risk at the portfolio level.


The Total Risk Limiter block uses this script to add up the risk for each instrument:


' Add the instrument risk to the total risk.
totalRisk = totalRisk + instrument.currentPositionRisk


Edit Time: 9/25/2017 09:09:58 AM

Topic ID#: 215


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