1.
Advanced Money Management
1.2. Create money management rules
You can also create money management rules by selecting (Analysis -> Advanced Money Management)
· OnNewTrade: Called before the application open a position · OnCloseTrade: Called before the application exit a position · OnEndPeriod: Called at the end of a period (On historical back testing a period is a day, a week or a month, depending on the timeframe) · OnStartSimulation: Called just before the simulator starts · OnEndSimulation: Called just after the simulator ends Each event has its own variables and functions; you can create a script for each event. Example (OnEndPeriod Event): We are going to create a script that will
order the simulator not to take new positions for the next 30 bars if the
portfolio drawdown is below -20 percent. if(Portfolio.Drawdown < -20) { // If portfolio drawdown is less than 20 percent, then we order the simulator // not to take new positions for the next 30 bars Functions.SkipPeriods(30); }
|
|