Your interactive trading laboratory!
 • 
31 users online

Quantacula Help

How-To
C# API Reference
Extensions
Development Blog
API-Extensions
Indicator Spotlights

QCommunity Extensions
The open-source GitHub repository of source code for the QCommunity Extensions library. Contains indicators and other extensions submitted by the Quantacula Community. Look for QCommunity indicators when you create a Building Block model, mark the "QCommunity" library check box to expose them.

TASC-Extensions
The open-source GitHub repository of source code for the TASCExtensions Quantacula extension. Contains indicators and other extensions adapted from the Traders' Tips articles in Technical Analysis of Stocks & Commodities magazine.
Enums
Namespace: Quantacula.Core
Parent: none (enums)

These are the various enumerated types used throughout the Quantacula .NET Framework.

Enumerated Types

HistoryScales
public enum HistoryScales

Represents the scale of historical data. Possible values are:

  • Daily
  • Weekly
  • Monthly
  • Quarterly
  • Yearly
  • Tick
  • Second
  • Minute

LineStyles
public enum LineStyles

Describes how lines can be drawn in the various chart rendering methods of UserModelBase. Possible values are:

  • Solid
  • Dashed
  • Dotted
  • Thick

OrderType
public enum OrderType

Specifies a type of order submitted to the backtester or broker. Possible values are:

  • Market - executes the order at the bar's open price.
  • Limit - executes the order if the bar's price penetrates below (for long entry or short exit) or above (for short entry or long exit) the order price. If the open price of the bar gaps beyond the limit price, the order is filled at the bar's open price.
  • Stop - executes the order if the bar's price penetrates above (for long entry or short exit) or below (for short entry or long exit) the stop price. If the open price of the bar gaps beyond the stop price, the order is filled at the bar's open price.
  • FixedPrice - a pseudo order type used in cases where you want an order to execute at a specific price for backtest purposes.
  • LimitMove - works like a Limit order, but for entry orders only, the backtester will not execute the order if the price opens beyond the order Price. The Quantacula Studio Quotes & Price Triggers tool also contains logic to suppress the execution of LimitMove price triggers whose first recorded tick is beyond the Price.
  • MarketClose - executes the order at the bar's closing price. To model system's that execute orders at the closed based on data from the same bar, you'll need to incorporate some special logic. See this Dev Blog post for details.
  • FixedPrice - executes the order at exactly the order price specified, if it is within the range of the bar's OHLC data.

ParameterTypes
public enum ParameterTypes

Represents the type of a parameter for a model or indicator. Parameters are instances of the Parameter class. Possible values are:

  • Int32
  • Double
  • String
  • Boolean
  • TimeSeries
  • BarHistory
  • Color
  • LineStyle
  • Text - a string that exposed as a multiline text field in the user interface
  • Font
  • StringChoice - a string with a discrete number of possible values
  • Indicator
  • Smoother - an indicator that is also a Smoother
  • IndicatorSource - used behind the scenes to flag a parameter to use a source based on another indicator
  • PriceComponent - open, high, low, close, volume, or one of the calculated average prices (PriceComponents enum)

PeakTroughReversalTypes
public enum PeakTroughReversalTypes

Describes the method that a PeakTroughCalculator used to determine peak/trough reversals. Possible values are:

  • Percent
  • Point

PeakTroughTypes
public enum PeakTroughTypes

Specifies whether an instance of the PeakTrough class represents a peak or a trough. PeakTrough instances are generated by the PeakTroughCalculator utility class. Possible values are:

  • Peak
  • Trough

PlotStyles
public enum PlotStyles

Represents the various types of indicator plotting styles available. Possible values are:

  • Line
  • Histogram
  • Dots
  • ThickLine
  • ThickHistogram
  • DottedLine
  • DashedLine
  • BooleanDots - always plots in the price pane, and draws a dot above the price bar whenever the indicator value is greater than zero. Bands - renders filled bands based on the source indicator and its BandCompanion - if a BandCompanion could not be found, plots as a line. ZigZag - works best with indicators like ZigZag which are composed of sporadic values interspersed with Double.NaN. Draws lines between the non-NaN values. Blocks - plots outlined blocks, each block encompasses a range of values that are the same. Useful for fundamental data. GradientBlocks - Like Blocks above, but fills the blocks with a gradient.

PositionType
public enum PositionType

Specifies the type of position, long or short. Possible values are:

  • Long
  • Short

PriceComponents
public enum PriceComponents

Represent the components of historical data, and some components derived from averaging the base components. Possible values are:

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

SignalStatuses
public enum SignalStatuses

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

  • Staged
  • Placed
  • Active
  • Filled
  • PartialFilled
  • CancelPending
  • Canceled
  • Error

TrailingStopTypes
public enum TrailingStopTypes

Trailing stop orders can be created using the CloseAtTrailingStop method of UserModelBase. The values below determine how trailing stop values are calculated.

  • PercentC - based on a percentage above/below price, calculated using closing price.
  • PercentHL - based on a percentage above/below price, calculated using highs and lows.
  • PointC - based on a fixed amount above/below price, calculated using closing price.
  • PointHL - based on a fixed amount above/below price, calculated using highs and lows.

TransactionType
public enum TransactionType

Specifies the type of transaction (or order). Possible values are:

  • Buy
  • Sell
  • Short
  • Cover