Skip to content
Black Friday: sale starts November 15th.

Signal Counter Node

Signal Counter node

The Signal Counter node counts bars with a signal (or without one) over a number of bars, and signals once the count is reached.

“Signal” here means any condition, not only a trade signal. For example: has the Stochastics been overbought or oversold for at least 5 bars? On a Renko chart, have there been at least 3 pullback bars? Are 3 or more of the last 20 bars touching a moving average? The Long and Short sides are counted separately.

The animation shows BloodHound v1; the ideas are the same in v2.

Properties tab

Property Inspector tabs, with the Properties tab selected

The essential settings for the node.

Modifiers

Buttons for the most common output modifiers. They change only the selected instance of a node on a Logic Board, so they appear only when a node is selected there, not when a solver is selected in the Solvers panel. That keeps the solver’s original output unchanged everywhere else it’s used, much like changing an SMA’s plot color on one chart leaves it unchanged on your other charts.

Modifiers: the Enabled, Invert and Swap buttons
ButtonWhat it does
EnableTurns the node on or off. When it’s off, the node is left out of the system’s calculations. It still looks connected on the Logic Board, but it’s ignored.
InvertInverts the node’s output. The same calculation as the Inverter function node, without its extra options.
SwapSwaps the outputs: Long becomes Short and Short becomes Long. The same as the Long/Short Modifier function node with Mode: Swap.

Properties

This node’s settings apply to this node only. Unlike a solver, which can be used in several places with shared Global Properties, each of these nodes is a single, independent node.

Options

Options: Counting What, Counting Up To, Lookback Period and Signal Threshold
SettingWhat it does
Counting WhatSignals: bars whose input is at or above the Signal Threshold.
Non Signals: bars whose input is below it.
All Bars: every bar. Use it to create a signal a number of bars after a reset.
Counting Up ToHow many to count within the Lookback Period before the node signals. For example, 3 for “3 or more touches of the moving average in the last 20 bars”.
Lookback PeriodHow many bars to count over. For example, on a 1 minute chart, to find a third CCI cross within 30 minutes, set 30.
Signal ThresholdThe smallest input value that counts as a signal.

Reset

Reset: Reset On

A reset sets the count back to zero. For example, counting over the last 10 bars, a reset 5 bars back restarts the count there, as if counting only the last 5 bars.

Reset On

Which signals reset (turn off) the node: signals at its Input connector, at its separate Reset connector, or both. Tick as many as you need, and untick any you don’t use so the node isn’t reset by accident.

As everywhere in BloodHound, the Long output and the Short output are reset separately: a Long reset signal resets only the Long side. The “Opposite” options are the exception that crosses over, letting a Short signal reset the Long side and vice versa.

The Reset On menu, with all eight options
OptionResets the node when…
Input SignalA Long signal at the Input connector resets the Long output’s calculation; a Short signal resets the Short output’s.
Input No SignalA bar with no Long signal at the Input resets the Long output’s calculation; a bar with no Short signal resets the Short output’s.
Reset SignalA Long signal at the Reset connector resets the Long output’s calculation; a Short signal resets the Short output’s.
Reset No SignalA bar with no Long signal at the Reset connector resets the Long output’s calculation; a bar with no Short signal resets the Short output’s.
Input Opposite SignalCrosses over: a Short signal at the Input resets the Long output’s calculation, and a Long signal resets the Short output’s.
Input Opposite No SignalA bar with no Short signal at the Input resets the Long output’s calculation; a bar with no Long signal resets the Short output’s.
Reset Opposite SignalA Short signal at the Reset connector resets the Long output’s calculation; a Long signal resets the Short output’s.
Reset Opposite No SignalA bar with no Short signal at the Reset connector resets the Long output’s calculation; a bar with no Long signal resets the Short output’s.

Output

Output: Output Style, Value At Zero Count and Value if Counted
SettingWhat it does
Output StyleDigital: the output stays at Value At Zero Count until the count is reached, then becomes Value if Counted.
Analog: the output rises with the count. With Counting Up To at 3 and Value if Counted at 1: 0.33 after the first, 0.67 after the second, 1 after the third.
Value At Zero CountThe output when nothing has been counted in the Lookback Period, and after a reset.
Value if CountedThe output once the count is reached.

Options tab

Property Inspector tabs, with the Options tab selected

Secondary settings shared by all nodes.

Weight

Changes the node’s final output value. Only needed when designing a fuzzy logic system, or a fuzzy logic part of a system.

How Weight works

Weight changes only the selected instance of a node on a Logic Board. So the controls appear only when a node is selected there, not when a solver is selected in the Solvers panel: a solver’s original output can’t be changed globally.

ControlWhat it does
Multiply OutputMultiplies the node’s internal Long and Short values (set by the Output Rules on the Properties tab) by this number. The final output still can’t go above 1 (see Slider).
SliderLimits the final output to between 0 and 1. The left handle sets a minimum output, given whether or not the condition is true. The right handle sets the maximum; the output is capped there.
Hedge OperationApplies a formula to the internal value.
None: unchanged.
Very: squares it (value²).
Somewhat: takes the square root (√value).

Example: two out of three

Three solvers check three indicator conditions, but only two need to be true. Connect them to an Additive logic node and set each solver’s maximum (the slider’s right handle) to 0.5. When any two are true, the Additive node adds 0.5 + 0.5 + 0 = 1, which means the two-out-of-three condition is met.

Description

Free text for describing what the node does or what it’s for. The Description is shared by every instance of the node, unlike Weight, which is set per instance.

Help tab

Property Inspector tabs, with the Help tab selected

Shows this page for the selected node, inside BloodHound. Click the node’s image at the top of the page to open it in a bigger window. The built-in web viewer needs NinjaTrader 8.0.26.0 or newer.

Example video

A simple example from the weekly workshop, May 4, 2023 (from 3:00).

Still stuck? Contact support