Framework Reference
WEALTHLAB FRAMEWORK / CLASS REFERENCE

Enums

API documentation, members, signatures, and C# examples.

Search the framework

Find classes, members, and documentation.

NamespaceWealthLab.Core
Parent

This page documents enumerated types used throughout the WealthLab .NET Framework.

Enumerated Types

18

Frequency

public enum Frequency

Represents the frequency of historical data. Possible values are:

  • Daily
  • Weekly
  • Monthly
  • Quarterly
  • Yearly
  • Tick
  • Second
  • Minute
  • Volume
  • Hour
  • NDays
  • WeeklyStartDay
  • SemiAnnually
  • BiWeekly

LineStyle

public enum LineStyle

Specifies how lines are rendered by WealthLab charting and drawing methods. Possible values are:

  • Solid
  • Dashed
  • Dotted

OptimizationRunType

public enum OptimizationRunType

Specifies the type of optimization run. Possible values are:

  • None
  • Standard
  • WFO
  • SymbolBySymbol

OptionSymbolFormat

public enum OptionSymbolFormat

Identifies supported option symbol formats. Possible values are:

  • Compact
  • OCC
  • LegacyMonthCode
  • TDAmeritrade
  • LegacyPadded

Remarks

  • Compact - Compact option symbol format. Example: TTD230712C75. Used by providers such as Interactive Brokers.
  • OCC - Standard OCC/OSI format using a padded strike price. Example: TTD230721C00075000. Used by providers such as Tradier and TradeStation.
  • LegacyMonthCode - Legacy format using a month letter code, day, and year. Example: TTD2321G75, where G represents July. Used by platforms such as TradingView, IQFeed, and Collective2.
  • TDAmeritrade - Obsolete TD Ameritrade format using an mmyydd date. Example: TTD_072123C75.
  • LegacyPadded - Legacy OCC format using a six-character space-padded underlying symbol. Example: TTD 230721C00075000. Used by Schwab.

OrderType

public enum OrderType

Specifies the type of order submitted to the Backtester or a Broker. Possible values are:

  • Market
  • Limit
  • Stop
  • FixedPrice
  • LimitMove
  • MarketClose
  • LimitClose
  • StopLimit

Remarks

  • Limit - Executes the simulated order if the bar's price reaches or penetrates the limit price in the favorable direction. If the bar opens beyond the limit price, the simulated order fills at the opening price.
  • Stop - Executes the simulated order if the bar's price reaches or penetrates the stop price. If the bar opens beyond the stop price, the simulated order fills at the opening price.
  • StopLimit - Works like a Stop order but adds a Limit price constraint. Assign the limit price to the Transaction's StopLimitLimitPrice property. Brokers can impose restrictions on the relationship between the Stop and Limit prices.
  • LimitMove - Works like a Limit order, but for entry orders the Backtester will not execute the simulated order if the bar opens beyond the order price. WealthLab's Quotes & Price Triggers tool also suppresses LimitMove triggers whose first recorded tick is already beyond the Price.
  • MarketClose - Executes the simulated order at the bar's closing price. See the usage notes below for same-bar and live-trading considerations.
  • LimitClose - Similar to MarketClose but with a Limit price constraint. If the closing price is not at or better than the Limit price, the order does not fill.
  • FixedPrice - A pseudo order type used primarily for backtest analysis. It executes at exactly the specified order price, which should fall within the bar's OHLC range. Market-On-Close and Limit-On-Close Usage Notes
  1. WealthLab can place Market On Close (MOC) and Limit On Close (LOC) orders with Brokers that support them. As a general rule, On-Close orders should be submitted sufficiently before the end of the session to participate in the closing auction. Brokers can reject or cancel orders submitted too late.
  2. The Backtester executes MarketClose and LimitClose orders on the following bar regardless of time scale. An intraday Strategy using On-Close orders for session-close logic should therefore place the order on the penultimate bar before the regular session close.
  3. Intraday Strategies generally should not use On-Close orders for ordinary midday trading. Use Market and Limit orders instead.
  4. For live trading behavior, see Preferences > Trading > Special Order Types > Use MOC/LOC when Possible. For hypothetical backtesting, you might want to analyze a completed bar and execute a MarketClose order on that same bar. This requires intentionally peeking at the following bar because Strategy logic normally cannot know the current bar's final values before its close. The example below demonstrates this technique. It suppresses the exit Signal on the final chart bar because no future bar exists to inspect.

ParameterType

public enum ParameterType

Represents the type of a Parameter used by WealthLab components such as Strategies and Indicators. Parameters are instances of the Parameter class. Possible values are:

  • Int32
  • Double
  • String
  • Boolean
  • TimeSeries
  • BarHistory
  • Color
  • LineStyle
  • Text
  • Font
  • StringChoice
  • Indicator
  • Smoother
  • IndicatorSource
  • PriceComponent
  • DataSet
  • ColorWpfDeprecated
  • HistoryScale
  • Date
  • Password
  • Label
  • SmootherType
  • IndicatorTSSource
  • DataRange

Remarks

  • Text - Exposes a string using a multiline text field in the user interface.
  • StringChoice - Exposes a string with a discrete set of possible values using a drop-down control.
  • IndicatorSource - Used internally to indicate that a Parameter obtains its source from another Indicator.
  • PriceComponent - Represents Open, High, Low, Close, Volume, or one of the calculated average-price components represented by the PriceComponent enum.

PlotStyle

public enum PlotStyle

Specifies the plotting style used to render an Indicator or TimeSeries on a chart. Possible values are:

  • Line
  • Histogram
  • Dots
  • ThickLine
  • ThickHistogram
  • DottedLine
  • DashedLine
  • BooleanDots
  • Bands
  • ZigZag
  • Blocks
  • GradientBlocks
  • BarHistory
  • BarChart
  • HistogramTwoColor
  • Oscillator
  • Cloud
  • Mountain

Remarks

  • BooleanDots - Always plots in the price pane and draws a dot above a price bar whenever the Indicator value is greater than zero.
  • Bands - Renders filled bands based on the source Indicator and its BandCompanion. The companion Indicators should have their Bars property assigned to the same BarHistory. If a BandCompanion cannot be found, the Indicator plots as a line. You can alternatively use PlotIndicatorBands.
  • ZigZag - Intended for Indicators such as ZigZag that contain sporadic values separated by Double.NaN. WealthLab draws lines between the non-NaN values.
  • Blocks - Plots outlined blocks, with each block spanning a range of identical values. This style is useful for fundamental or regime data.
  • GradientBlocks - Similar to Blocks, but fills each block using a gradient.

PositionType

public enum PositionType

Specifies whether a Position is Long or Short. Possible values are:

  • Long
  • Short

PriceComponent

public enum PriceComponent

Represents the components of historical market data and several price components derived by averaging the standard OHLC values. Possible values are:

  • Open
  • High
  • Low
  • Close
  • Volume
  • AveragePriceOHLC
  • AveragePriceHLC
  • AveragePriceHL
  • AveragePriceOC
  • AveragePriceHLCC

SignalStatus

public enum SignalStatus

Represents the possible states of an order during its lifetime while interacting with a Broker. Possible values are:

  • Staged
  • Placed
  • Active
  • Filled
  • PartialFilled
  • CancelPending
  • Canceled
  • Error
  • WaitForClose
  • Published
  • FinalOrder
  • HeldForReview
  • Killed

StrategyExecutionMode

public enum StrategyExecutionMode

Specifies the context in which the Backtester is executing a Strategy. The current value is available through the Backtester's ExecutionMode property. Possible values are:

  • Strategy
  • Optimization
  • StreamingChart
  • StrategyMonitor
  • Rankings
  • Evolver
  • SignalPublisher

TextShape

public enum TextShape

Provides special symbols that can be rendered with methods such as DrawBarAnnotation, including triangles, circles, squares, and stars. Possible values are:

  • TriangleUp
  • TriangleDown
  • TriangleHollowUp
  • TriangleHollowDown
  • SquareFilled
  • SquareHollow
  • SquareLeftTick
  • SquareRightTick
  • CircleHollow
  • CircleFilled
  • CircleCrosshair
  • CircleWithX
  • DiamondFilled
  • DiamondHollow
  • HexagonFilled
  • HexagonHollow
  • ArrowUp
  • ArrowDown
  • ArrowRight
  • ArrowLeft
  • ArrowRightLeft
  • StarFilled
  • StarHollow
  • Star8Points

TradingDayChoice

public enum TradingDayChoice

Identifies a calendar period used by trading-day utility methods that calculate elapsed or remaining trading days. Possible values are:

  • Weekly
  • Quarterly
  • Monthly

TrailingStopType

public enum TrailingStopType

Specifies how a trailing stop is calculated when using the CloseAtTrailingStop method of UserStrategyBase. Possible values are:

  • PercentC
  • PointC
  • PercentHL
  • PointHL
  • ATR

Remarks

  • PercentC - Uses a percentage distance above or below price and updates from closing prices.
  • PercentHL - Uses a percentage distance and updates from Highs for Long Positions and Lows for Short Positions.
  • PointC - Uses a fixed-point distance above or below price and updates from closing prices.
  • PointHL - Uses a fixed-point distance and updates from Highs for Long Positions and Lows for Short Positions.
  • ATR - Uses an ATR-based distance and updates from Highs for Long Positions and Lows for Short Positions. For a Chandelier-style exit, the distance from the highest or lowest point to the trailing stop is expressed in units of ATR.

TransactionType

public enum TransactionType

Specifies the type and direction of a Transaction or order. Possible values are:

  • Buy
  • Sell
  • Short
  • Cover

VerticalAlignment

public enum VerticalAlignment

Specifies the vertical alignment used by methods such as DrawTextVAlign. Possible values are:

  • Bottom
  • Center
  • Top

Need help with this API?

Ask the community or explore custom development services.