Table of Contents

Class SimulationOptions

Namespace
Balsam
Assembly
Balsam.Backtester.dll

Encapsulates various simulation settings.

public class SimulationOptions : ICloneable
Inheritance
SimulationOptions
Implements
Inherited Members
Extension Methods

Properties

AllowFillOutsideOfRange

Gets/sets whether stop orders can be filled on the closing price when it is outside of the day's range. For limit orders, set the corresponding LimitFillModel property.

public bool AllowFillOutsideOfRange { get; set; }

Property Value

bool

AutoRunMoneyManager

Gets/sets whether a money manager, if available, is automatically run after the strategy is processed. Default is true.

public bool AutoRunMoneyManager { get; set; }

Property Value

bool

Default

Gets the default simulation options.

public static SimulationOptions Default { get; }

Property Value

SimulationOptions

DefaultQuantity

Gets/sets the default quantity that will be assumed for orders that do not specify quantity. Defaults to 1.

public double DefaultQuantity { get; set; }

Property Value

double

ExitOnLastBar

Gets/sets whether a strategy automatically submits MOC orders to close open positions on the last bar.

public bool ExitOnLastBar { get; set; }

Property Value

bool

IndeterminatePriceSequenceRule

Gets/sets how multiple orders in the same bar are processed if the sequence of prices can't be guaranteed.

public IndeterminateOrderHandling IndeterminatePriceSequenceRule { get; set; }

Property Value

IndeterminateOrderHandling

IsRemote

Gets whether the simulation is running on a remote server.

[JsonIgnore]
public static bool IsRemote { get; set; }

Property Value

bool

LimitFillModel

Gets/sets the limit fill model.

public LimitFillModel LimitFillModel { get; set; }

Property Value

LimitFillModel

LimitMoveOption

Gets/sets the limit move processing logic to be applied.

public LimitMoveOption LimitMoveOption { get; set; }

Property Value

LimitMoveOption

MarketOrderFillPrice

Gets/sets the simulation price used for market orders.

public MarketOrderFillPrice MarketOrderFillPrice { get; set; }

Property Value

MarketOrderFillPrice

OnCloseCurrentBar

Gets/sets whether orders with TimeInForce of Close are executed on the current bar. Typically used for MOC orders in backtesting. Defaults to true. Not available in production mode.

public bool OnCloseCurrentBar { get; set; }

Property Value

bool

RiskATRLength

Gets/sets the ATR length used for the risk calculation. This value will be accessible via the Atr property of Trade object in the money manager.

public int RiskATRLength { get; set; }

Property Value

int

StrategyTemplate

Gets/sets the strategy template file.

public string StrategyTemplate { get; set; }

Property Value

string

TickRounding

Get/sets how stop and limit order prices are automatically rounded.

public TickRounding TickRounding { get; set; }

Property Value

TickRounding

UseConstantDollarPositionSize

Gets/sets whether position size will be automatically calculated to match a notional value as specified by DefaultQuantity.

public bool UseConstantDollarPositionSize { get; set; }

Property Value

bool

Methods

Equals(SimulationOptions)

Returns true if all properties of the specified SimulationOptions object are equal to the current instance.

public bool Equals(SimulationOptions options)

Parameters

options SimulationOptions

Returns

bool

Equals(object)

Returns true if the specified object is equal to the current instance.

public override bool Equals(object obj)

Parameters

obj object

Returns

bool

GetHashCode()

Returns the hash code for this instance.

public override int GetHashCode()

Returns

int