Skip to main content

Action

Action is a Signal subclass that executes a side effect at any position in the decision tree. Unlike regular signals that only determine direction, actions perform work (e.g., creating a rolling volume profile). Because Action inherits from Signal, it participates in the same tree evaluation order as other nodes.

Namespace: MZpack.NT8.Algo Inheritance: Action : Signal Source: [INSTALL PATH]/API/Actions/Action.cs

Properties

Action inherits all properties from Signal (Strategy, MarketDataSource, Calculate, IsReset, Direction, EntryPrice, ChartRange, etc.).

Constructor

public Action(Strategy strategy, MarketDataSource source,
SignalCalculate calculate, bool isReset)

Methods

MethodDescription
OnMarketEvent(object e, MarketDataSource source, bool isFirstTickOfBar, SignalDirection allowed)Dispatches to OnCalculate based on source type, respecting the Calculate property
GetRange(ChartRange range)Empty override — actions do not contribute to chart range

RollingProfileAction

Creates a rolling volume profile over a specified number of bars.

Inheritance: RollingProfileAction : Action Source: [INSTALL PATH]/API/Actions/RollingProfileAction.cs

Properties

PropertyTypeDescription
BarsRangeintNumber of bars for the rolling profile

Constructor

public RollingProfileAction(Strategy strategy,
StrategyVolumeProfileIndicator indicator,
StrategyVolumeProfileIndicator outerProfileIndicator)

Sets MarketDataSource = Level1, Calculate = OnBarClose, IsReset = true. Switches the indicator to ProfileCreation.Custom.

Behavior

On each bar close, OnCalculate creates or rolls the volume profile. Once the profile spans BarsRange bars, the action returns Direction = SignalDirection.Any to indicate the profile is ready.

Reset clears the profile view visibility.

See Also