Skip to main content

UpDownBarSignal

Returns a direction based on whether the current bar is bullish (Close > Open) or bearish (Close < Open). Optionally reverses the direction for counter-trend strategies.

Namespace: MZpack.NT8.Algo.Signals Inheritance: UpDownBarSignal : Signal Data source: Level1 | Calculate: OnBarClose Source: [INSTALL PATH]/API/Signals/UpDownBarSignal.cs

Parameters

NameTypeDefaultDescription
IsReverseboolfalseReverse the direction (bearish bar → Long, bullish bar → Short)

Signal Logic

DirectionCondition
LongClose > Open (bullish bar)
ShortClose < Open (bearish bar)

When IsReverse = true, directions are swapped: a bearish bar returns Long and a bullish bar returns Short.

Example

var signal = new UpDownBarSignal(strategy);
signal.IsReverse = false; // trade with the bar direction

pattern.Signals.Root.Add(signal);