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
| Name | Type | Default | Description |
|---|---|---|---|
IsReverse | bool | false | Reverse the direction (bearish bar → Long, bullish bar → Short) |
Signal Logic
| Direction | Condition |
|---|---|
| Long | Close > Open (bullish bar) |
| Short | Close < 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);