Network MACD¶
v.1.2.0.0

Overview¶
Combines the MACD's signal line at four moments - now and one, two and three Lag steps back - with weights W1-W4 into one value, the network, drawn as columns: blue above the Threshold, red below minus it, grey in between. Different weights and lags give different views of momentum; Neural Network MACD trades it.
How it works¶
- N = W1 × Avg now + W2 × Avg 1 lag back + W3 × Avg 2 lags back + W4 × Avg 3 lags back, Avg the MACD signal line and a lag Lag step bars.
- Signal: +1 while N is above Threshold, -1 while below minus Threshold, 0 in between.
- No value until the MACD and all four readings exist.
Parameters¶
MACD¶
| Parameter | Default | What it does |
|---|---|---|
| Fast | 12 | The fast EMA period of the MACD. |
| Slow | 26 | The slow EMA period of the MACD. |
| Smooth | 9 | The period of the MACD's signal line (Avg) - the line the network weighs. |
Network¶
| Parameter | Default | What it does |
|---|---|---|
| W1 (now) | 1 | The weight of the signal line on the current bar. |
| W2 (1 lag back) | 1 | The weight of the signal line one lag step back. |
| W3 (2 lags back) | 1 | The weight of the signal line two lag steps back. |
| W4 (3 lags back) | 1 | The weight of the signal line three lag steps back. |
| Lag step (bars) | 7 | How many bars apart the four readings of the signal line are: 7 = now, 7, 14 and 21 bars back. |
| Threshold | 0 | Signal is +1 while the network is above this, -1 while below minus this, 0 in between - so a network hovering at zero gives no signal. |
Visual¶
| Parameter | Default | What it does |
|---|---|---|
| Long color | dodger blue | Bars above the threshold. |
| Short color | orange red | Bars below minus the threshold. |
| Neutral color | dim gray | Bars inside the threshold. |
For strategies¶
| Value | Meaning |
|---|---|
| Network | The network's value N. |
| Signal | +1 above the threshold, -1 below minus it, 0 in between. |
Version history¶
v.1.2.0.0 - October 2026
- Added: Lag step (the readings were fixed 7 bars apart), Threshold and the Signal value; columns coloured by side.
Earlier versions
v.1.1.0.0 - October 2026
- Changed: computed once a bar; zero values shown.