Skip to main content Skip to footer

To create new Money Management model a developer should create a class and inherit it from MoneyManagement class. After it he will have to implement method OnCalculate and place position sizing logic in there. 

 internal class TestMoneyManagement:MoneyManagement
{
  #region Overrides of MoneyManagement

  /// <inheritdoc />
  protected override MoneyManagementResult OnCalculate(TradeAction tradeAction, double price)
  {
      //Write your code here
      return new MoneyManagementResult(new Quantity(1));
  }

  #endregion
}

Also there are other usuful function a developer can use for creating Money management model:

  • SetAccount - allows to handle account setting
public override void SetAccount(Account account)
{
      //Write your code here
 }
  • SetInstrument - allows to handle instrument setting;
public override void SetInstrument(Instrument instrument)
{
     //Write your code here
}

There are several standard money management models a developer can use for strategy development;

Developed money managent model can be used as a parameter for the strategy on a chart or in backtester. 

Cookies Notice

We use cookies to improve your experience, personalize content, and analyze our traffic. By clicking "Accept All Cookies," you agree to the storing of cookies on your device. You can manage your cookie preferences at any time by visiting our Cookie Settings.