Click or drag to resize

Commission settings window

CommissionWindow - - A special window for setting the rules for charging a commission.

API Comission Window

Below is an example of the code to call window for setting the rules for charging a commission.

C#
private void RiskButton_OnClick(object sender, RoutedEventArgs e)
{
    var wnd = new CommissionWindow();
    wnd.Rules.AddRange(Strategy.RiskManager.Rules.Select(r => r.Clone()));

    if (!wnd.ShowModal(this))
        return;

    Strategy.RiskManager.Rules.Clear();
    Strategy.RiskManager.Rules.AddRange(wnd.Rules);
}