Click or drag to resize

Pattern Class

Trading pattern class for using in a MZpack algorithmic strategy.
Inheritance Hierarchy
SystemObject
  ViewModelBase
    MZpack.NT8.AlgoPattern

Namespace:  MZpack.NT8.Algo
Assembly:  MZpack.NT8.Pro (in MZpack.NT8.Pro.dll) Version: 3.18.1.0 (3.18.1.0)
Syntax
C#
public class Pattern : ViewModelBase, ICloneable

The Pattern type exposes the following members.

Constructors
  NameDescription
Public methodPattern
Initializes a new instance of the Pattern class
Public methodPattern(Strategy, Logic, Range, Boolean)
Creates a new instance of the Pattern class containing signals tree.
Public methodPattern(Strategy, Logic, Range, Logic, Range, Boolean)
Creates a new instance of the Pattern class containing signals and filters trees.
Top
Properties
  NameDescription
Public propertyAllowedDirection
Allowed direction of the pattern. Default value is SignalDirection.Any. Use it to optimize calculation of signals and filters.
Public propertyDirection
Resulting direction of the pattern.
Public propertyFilters
Filters logical tree for entering position.
Public propertyIsEntryPattern
True if the pattern is an entry pattern. False if the pattern is an exit pattern.
Public propertySignals
Signals logical tree for entering position.
Public propertyStrategy
Parent strategy.
Top
Methods
  NameDescription
Public methodClone
Public methodGetEntryPrice
Returns entry/exit price of the validated pattern.
Public methodToLegendView
Top
Examples
Creates a pattern
C#
Pattern pattern = new Pattern(Strategy,
    Logic.And, // Logic for root node of signals tree
    new Range() { Bars = 3, Ticks = 5 },  // Range for signals (0 = no range limit)
    Logic.And, // Logic for root node of filters tree
    new Range() { Bars = 5 }, // Range for filters
    true); // Short-cuircit for AND evaluation

pattern.AllowedDirection = SignalDirection.Any; // Set allowed direction
See Also