The  Risk Manager block is used for filtering entry trades based on risk thresholds, adjusting stops, and reducing or exiting positions if necessary to reduce overall portfolio risk. It includes the following scripts:


Block Type

Script Type




Called When




Risk Manager




Before Test



start of test

Initialize Risk Management



end of day

Compute Instrument Risk




end of day

Compute Risk Adjustment



end of day

Adjust Instrument Risk




end of day

Can Add Unit


called by broker when for entry orders

Can Fill Order


called as order is about to be filled






As indicated above, the instrument-specific scripts associated with the Risk Manager loop over instruments with existing positions. They do not loop over instruments that are not in an active position.


The Can Add Unit and Can Fill Orders scripts can be added to any block. In this way multiple blocks can process these scripts to determine if an order can be placed or filled.


Edit Time: 4/14/2018 1:56:26 PM

Topic ID#: 506


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