@pgnio/helios-mcp 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-UHFLF3UG.mjs +3051 -0
- package/dist/cli.js +2 -2
- package/dist/cli.mjs +1 -1
- package/dist/index.js +2 -2
- package/dist/index.mjs +1 -1
- package/docs/ai-agent-indicators/00_columns.txt +74 -0
- package/docs/ai-agent-indicators/00_index.txt +4 -19
- package/package.json +1 -1
- package/docs/ai-agent-indicators/squeeze_duration.txt +0 -115
- package/docs/ai-agent-indicators/squeeze_energy.txt +0 -128
- package/docs/ai-agent-indicators/tf_alignment.txt +0 -165
- package/docs/ai-agent-indicators/volatility_squeeze.txt +0 -169
package/dist/cli.js
CHANGED
|
@@ -2618,7 +2618,7 @@ function createHeliosMarketToolDefinitions(service) {
|
|
|
2618
2618
|
{
|
|
2619
2619
|
name: "helios_market_get_snapshot",
|
|
2620
2620
|
title: "Get Helios Market Snapshot",
|
|
2621
|
-
description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. By default: the top 50 coins by market cap with the main columns; name symbols to get other coins, pass fields for other columns.",
|
|
2621
|
+
description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. By default: the top 50 coins by market cap with the main columns; name symbols to get other coins, pass fields for other columns. What each column means: helios_docs_get_document with path ai-agent-indicators/00_columns.txt (read it once).",
|
|
2622
2622
|
inputSchema: marketSnapshotInputSchema,
|
|
2623
2623
|
async execute(input) {
|
|
2624
2624
|
const result = marketSnapshotToolOutputSchema.parse(await service.getSnapshot(input));
|
|
@@ -2886,7 +2886,7 @@ async function createHeliosAgentMcpServer(options) {
|
|
|
2886
2886
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
2887
2887
|
const server = new McpServer({
|
|
2888
2888
|
name: "helios",
|
|
2889
|
-
version: "0.2.
|
|
2889
|
+
version: "0.2.8"
|
|
2890
2890
|
});
|
|
2891
2891
|
const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
|
|
2892
2892
|
const client = new HeliosAgentAuthClient({
|
package/dist/cli.mjs
CHANGED
package/dist/index.js
CHANGED
|
@@ -2692,7 +2692,7 @@ function createHeliosMarketToolDefinitions(service) {
|
|
|
2692
2692
|
{
|
|
2693
2693
|
name: "helios_market_get_snapshot",
|
|
2694
2694
|
title: "Get Helios Market Snapshot",
|
|
2695
|
-
description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. By default: the top 50 coins by market cap with the main columns; name symbols to get other coins, pass fields for other columns.",
|
|
2695
|
+
description: "Returns a compact market snapshot for the selected, all, or explicitly requested symbols. By default: the top 50 coins by market cap with the main columns; name symbols to get other coins, pass fields for other columns. What each column means: helios_docs_get_document with path ai-agent-indicators/00_columns.txt (read it once).",
|
|
2696
2696
|
inputSchema: marketSnapshotInputSchema,
|
|
2697
2697
|
async execute(input) {
|
|
2698
2698
|
const result = marketSnapshotToolOutputSchema.parse(await service.getSnapshot(input));
|
|
@@ -2960,7 +2960,7 @@ async function createHeliosAgentMcpServer(options) {
|
|
|
2960
2960
|
const { McpServer } = await import("@modelcontextprotocol/sdk/server/mcp.js");
|
|
2961
2961
|
const server = new McpServer({
|
|
2962
2962
|
name: "helios",
|
|
2963
|
-
version: "0.2.
|
|
2963
|
+
version: "0.2.8"
|
|
2964
2964
|
});
|
|
2965
2965
|
const sessionStore = options.sessionStore ?? new FileAgentSessionStore(options.sessionPath ?? getDefaultHeliosAgentMcpSessionPath());
|
|
2966
2966
|
const client = new HeliosAgentAuthClient({
|
package/dist/index.mjs
CHANGED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
HELIOS SNAPSHOT COLUMNS: HOW TO READ THEM
|
|
2
|
+
Short guide to the column ids in helios_market_get_snapshot, _chunk and symbol detail `row`.
|
|
3
|
+
All % values are already percent (2.5 = 2.5%). null = unavailable, never zero.
|
|
4
|
+
Longer guides for single indicators are in this folder (see 00_index.txt).
|
|
5
|
+
|
|
6
|
+
PRICE AND SIZE
|
|
7
|
+
rank market cap rank (1 = largest). null = unranked.
|
|
8
|
+
lp last price.
|
|
9
|
+
qv 24h quote volume in USD. Low qv = thin market, wider fills.
|
|
10
|
+
bv 24h base volume (coins).
|
|
11
|
+
|
|
12
|
+
RETURNS (% change over the window)
|
|
13
|
+
r1m r3m r5m r15m r30m r1h r2h r4h r6h r8h r12h r24h r3d r7d
|
|
14
|
+
|
|
15
|
+
DISTANCE FROM RECENT RANGE
|
|
16
|
+
fh24 fh7 % from the 24h / 7d high. Always <= 0. -10 = 10% below the high.
|
|
17
|
+
fl24 fl7 % from the 24h / 7d low. Always >= 0. 2 = 2% above the low.
|
|
18
|
+
Near 0 on fl = sitting on the low; near 0 on fh = at the high.
|
|
19
|
+
|
|
20
|
+
REGIME AND MOMENTUM
|
|
21
|
+
reg regime label from 12 timeframe changes:
|
|
22
|
+
up: CASCADE UP, PARABOLIC, BREAKOUT, TREND UP, GRIND UP, SPIKE UP
|
|
23
|
+
down: CASCADE DOWN, CRASH, BREAKDOWN, TREND DN, BLEED, SPIKE DN
|
|
24
|
+
turning: REVERSAL (down->up), ROLLOVER (up->down), EXHAUST UP, EXHAUST DN
|
|
25
|
+
no trend: CHOP, CONSOL, RANGING (momentum signals are weak here)
|
|
26
|
+
Known quirk: a steady fall can read CRASH even when not accelerating.
|
|
27
|
+
hmi Helios momentum index, -100..100. Cross-timeframe momentum, 1h-4h weigh most.
|
|
28
|
+
> 40 strong up, 15..40 up, -15..15 no direction, < -40 strong down.
|
|
29
|
+
hmiv hmi velocity (rate of change of hmi). > 0 momentum improving, < 0 fading.
|
|
30
|
+
Meaningless when hmi is between -15 and 15.
|
|
31
|
+
tri trend strength label: STRONG TREND, MODERATE TREND, WEAK TREND, RANGING/CHOPPY.
|
|
32
|
+
No direction: use hmi or reg for which way.
|
|
33
|
+
trv trend strength 0..100 (> 60 STRONG, > 40 MODERATE, > 20 WEAK).
|
|
34
|
+
de directional efficiency -1..1. +1 every timeframe moving up cleanly,
|
|
35
|
+
-1 every timeframe moving down cleanly, near 0 choppy.
|
|
36
|
+
|
|
37
|
+
STRETCH
|
|
38
|
+
ob overbought, 0..100 (weighted RSI across timeframes). >= 70 stretched up,
|
|
39
|
+
<= 30 stretched down.
|
|
40
|
+
obosp probability ob is high versus its own last 60 readings, 0..1.
|
|
41
|
+
> 0.9 extreme for this coin right now, < 0.1 extreme low.
|
|
42
|
+
In a strong trend ob can be 95 while obosp is low; read both.
|
|
43
|
+
vwz VWAP z-score vs the 7d VWAP. > +2 far above, -0.5..0.5 at VWAP, < -2 far below.
|
|
44
|
+
|
|
45
|
+
STRUCTURE
|
|
46
|
+
ms market structure: RANGING, CONSOL (compressed), BREAKING↑ / BREAKING↓,
|
|
47
|
+
CONFIRMED-BREAK↑ / ↓, TEST-S (testing support), TEST-R (testing resistance),
|
|
48
|
+
FAILED-BREAK (breakout that reversed).
|
|
49
|
+
srs nearest support price. srr nearest resistance price (null = none found).
|
|
50
|
+
|
|
51
|
+
SCORE
|
|
52
|
+
hs Helios score, a mean-reversion setup score. Positive = long setup
|
|
53
|
+
(needs ob <= 30 and de <= -0.4), negative = short setup (ob >= 60, de >= 0.4),
|
|
54
|
+
0 = no setup. Size: 5+ notable, 7+ strong, 9+ rare. Short scores have not
|
|
55
|
+
held up in backtests; long scores in a falling market have.
|
|
56
|
+
|
|
57
|
+
OTHER COLUMNS (only with fields)
|
|
58
|
+
hfi Helios flow index (funding, OI, CVD), -100..100. Its OI part saturates; treat as rough.
|
|
59
|
+
ar az activity ratio and z-score (volume now vs baseline; ar < 0.5 = dead).
|
|
60
|
+
vwap poc pocd vap VWAP price, volume point of control, % from it, value-area position.
|
|
61
|
+
macdh macds macdd MACD histogram, signal label, divergence.
|
|
62
|
+
vcc vcp volatility clustering and change-point probability.
|
|
63
|
+
obosd overbought/oversold divergence. trh trend Hurst (> 0.5 trending).
|
|
64
|
+
|
|
65
|
+
MARKET BLOCK (every response)
|
|
66
|
+
os how many of 23 large coins are down more than 7% in 24h (0..23). High = broad selloff.
|
|
67
|
+
mti micro trend: 5m + 1h moves of BTC, ETH, BNB, SOL, scaled. > 0 majors rising now.
|
|
68
|
+
Mti macro trend: weighted 5m/1h/6h/24h momentum of six majors, in %. > 0 market up.
|
|
69
|
+
|
|
70
|
+
WHAT HAS HELD UP IN BACKTESTS (out of sample, last 2 years)
|
|
71
|
+
- Buying a sharp turn up (hmiv > 0, r15m and r1h turning positive) in a coin whose
|
|
72
|
+
reg is BREAKDOWN or CRASH, especially when the whole market is down (os high, Mti < 0).
|
|
73
|
+
- Fading stretched moves beat chasing them.
|
|
74
|
+
- Shorts did not hold up. Edges are small (about +0.1% a trade): size small, always use a stop.
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
================================================================================
|
|
2
2
|
HELIOS INDICATOR INDEX — AI AGENT REFERENCE
|
|
3
3
|
================================================================================
|
|
4
|
-
#
|
|
5
|
-
#
|
|
4
|
+
# START WITH 00_columns.txt: a short guide to every snapshot column id (hmi, reg, ob, hs...).
|
|
5
|
+
# The entries below are longer guides, one per indicator. Format: file | data_field | type | range | purpose
|
|
6
|
+
# data_field names here are the long names; snapshot columns use the short ids in 00_columns.txt.
|
|
6
7
|
|
|
7
8
|
--------------------------------------------------------------------------------
|
|
8
9
|
MOMENTUM / DIRECTION
|
|
@@ -22,10 +23,6 @@ regime.txt
|
|
|
22
23
|
19-state market regime classifier (e.g. CASCADE_UP, CHOP, REVERSAL).
|
|
23
24
|
PRIMARY GATE: invalidates all momentum indicators when CHOP/CONSOL/RANGING.
|
|
24
25
|
|
|
25
|
-
tf_alignment.txt
|
|
26
|
-
indicators.tf_alignment | NUMERIC | 0..100
|
|
27
|
-
% of short-TF (1m-2h) movement aligned with macro (4h-24h) direction.
|
|
28
|
-
Breadth complement to HMI magnitude.
|
|
29
26
|
|
|
30
27
|
directional_efficiency.txt
|
|
31
28
|
indicators.directional_efficiency | NUMERIC | -1..1
|
|
@@ -135,21 +132,10 @@ hfi_weights.txt
|
|
|
135
132
|
Any weight < 0.10 = that data source is degraded.
|
|
136
133
|
|
|
137
134
|
--------------------------------------------------------------------------------
|
|
138
|
-
VOLATILITY
|
|
135
|
+
VOLATILITY
|
|
139
136
|
--------------------------------------------------------------------------------
|
|
140
|
-
volatility_squeeze.txt
|
|
141
|
-
indicators.volatility_squeeze | NUMERIC | [0, ∞); typical [0.1, 1.5]
|
|
142
|
-
Short/long GARCH(1,1) ratio. LOWER = MORE compressed (< 0.8 = in squeeze).
|
|
143
|
-
Counterintuitive scale: value 0.2 = maximum squeeze, NOT minimum.
|
|
144
137
|
|
|
145
|
-
squeeze_duration.txt
|
|
146
|
-
indicators.squeeze_duration | INTEGER | [0, ∞)
|
|
147
|
-
Count of consecutive ticks with volatility_squeeze < 0.8. Resets to 0 on break.
|
|
148
138
|
|
|
149
|
-
squeeze_energy.txt
|
|
150
|
-
indicators.squeeze_energy | NUMERIC | [0, ∞)
|
|
151
|
-
Integrated compression: squeeze_duration × (0.8 - volatility_squeeze).
|
|
152
|
-
Summary measure of pent-up energy. Zero = no active squeeze.
|
|
153
139
|
|
|
154
140
|
volatility_clustering.txt
|
|
155
141
|
indicators.volatility_clustering | NUMERIC | [0.7, 1.5] ← NOT [0, 1]
|
|
@@ -200,7 +186,6 @@ DEPENDENCY MAP — KEY RELATIONSHIPS
|
|
|
200
186
|
macd_signal → macd_histogram (state without magnitude is incomplete)
|
|
201
187
|
macd_divergence → macd_signal (divergence leads; cross confirms)
|
|
202
188
|
hfi → hfi_weights (composite without component split is opaque)
|
|
203
|
-
squeeze_energy → volatility_squeeze + squeeze_duration (derived from both)
|
|
204
189
|
vwap_zscore → vwap + volatility_clustering (both required for interpretation)
|
|
205
190
|
poc_distance → poc (normalized deviation requires knowing the level)
|
|
206
191
|
value_area_position → regime (same state is opposite signal in different regimes)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pgnio/helios-mcp",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.8",
|
|
4
4
|
"description": "Helios MCP server: connect an AI agent to your Helios account to read markets and your portfolio and to trade on Hyperliquid. Most apps can use the hosted URL https://helios.pgn.io/mcp instead.",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"homepage": "https://helios.pgn.io/?connect=ai",
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
================================================================================
|
|
2
|
-
INDICATOR: SQUEEZE_DURATION — VOLATILITY SQUEEZE DURATION
|
|
3
|
-
================================================================================
|
|
4
|
-
id: squeeze_duration
|
|
5
|
-
data_field: indicators.squeeze_duration
|
|
6
|
-
type: NUMERIC (integer count)
|
|
7
|
-
range: [0, ∞)
|
|
8
|
-
precision: Integer (whole number of ticks)
|
|
9
|
-
update_rate: per_tick
|
|
10
|
-
latency_profile: COINCIDENT
|
|
11
|
-
|
|
12
|
-
--------------------------------------------------------------------------------
|
|
13
|
-
CONSTRUCT
|
|
14
|
-
--------------------------------------------------------------------------------
|
|
15
|
-
squeeze_duration counts the number of consecutive ticks where the volatility
|
|
16
|
-
squeeze value has been BELOW the squeeze threshold of 0.8.
|
|
17
|
-
|
|
18
|
-
IF indicators.volatility_squeeze < 0.8
|
|
19
|
-
squeeze_duration += 1
|
|
20
|
-
|
|
21
|
-
IF indicators.volatility_squeeze >= 0.8
|
|
22
|
-
squeeze_duration = 0 (reset immediately when squeeze breaks)
|
|
23
|
-
|
|
24
|
-
A duration of 0 means either the squeeze is not active (value >= 0.8) or
|
|
25
|
-
the squeeze just started this tick (first tick below 0.8).
|
|
26
|
-
|
|
27
|
-
This indicator quantifies the TIME dimension of the squeeze. When combined
|
|
28
|
-
with volatility_squeeze (depth) and squeeze_energy (integrated depth × time),
|
|
29
|
-
it provides the full picture of a squeeze development.
|
|
30
|
-
|
|
31
|
-
--------------------------------------------------------------------------------
|
|
32
|
-
RANGE INTERPRETATION
|
|
33
|
-
--------------------------------------------------------------------------------
|
|
34
|
-
value = 0
|
|
35
|
-
No active squeeze. volatility_squeeze >= 0.8. Normal or expanding
|
|
36
|
-
volatility conditions. OR: squeeze just broke this tick (value resets
|
|
37
|
-
immediately). In either case: not in a sustained compression state.
|
|
38
|
-
|
|
39
|
-
value 1-5 (very short)
|
|
40
|
-
Just entered squeeze territory. Compression has barely begun.
|
|
41
|
-
Insufficient duration for meaningful energy buildup. Do not treat as
|
|
42
|
-
an active squeeze setup until duration is longer.
|
|
43
|
-
|
|
44
|
-
value 6-20 (short squeeze)
|
|
45
|
-
Squeeze has persisted for a meaningful period. Some directional energy
|
|
46
|
-
is building, especially if volatility_squeeze is also deep (< 0.5).
|
|
47
|
-
Combination of squeeze_duration and squeeze_energy now worth monitoring.
|
|
48
|
-
|
|
49
|
-
value 21-60 (moderate squeeze)
|
|
50
|
-
Sustained compression. An extended period of volatility below the GARCH
|
|
51
|
-
baseline. This duration at low squeeze_value produces significant squeeze_energy.
|
|
52
|
-
Market is in a genuine consolidation/coiling phase.
|
|
53
|
-
|
|
54
|
-
value > 60 (extended squeeze)
|
|
55
|
-
Prolonged compression. Very significant stored directional energy by any
|
|
56
|
-
measure. Extended squeezes historically precede the most significant
|
|
57
|
-
breakout moves. The asset has been unable to sustain any realized trend
|
|
58
|
-
for a long period.
|
|
59
|
-
|
|
60
|
-
--------------------------------------------------------------------------------
|
|
61
|
-
INDICATOR RELATIONSHIPS
|
|
62
|
-
--------------------------------------------------------------------------------
|
|
63
|
-
indicators.volatility_squeeze | REQUIRED_COMPANION
|
|
64
|
-
squeeze_duration counts ticks at squeeze; but duration without
|
|
65
|
-
knowing the depth (volatility_squeeze value) is incomplete.
|
|
66
|
-
|
|
67
|
-
High duration + deep squeeze = maximum energy accumulation.
|
|
68
|
-
High duration + shallow squeeze (value = 0.75) = moderate accumulation.
|
|
69
|
-
Low duration + deep squeeze = sudden sharp compression, not settled yet.
|
|
70
|
-
|
|
71
|
-
The most significant setups are:
|
|
72
|
-
volatility_squeeze < 0.4 AND squeeze_duration > 30
|
|
73
|
-
|
|
74
|
-
indicators.squeeze_energy | COMPANION
|
|
75
|
-
squeeze_energy = squeeze_duration × (0.8 - volatility_squeeze)
|
|
76
|
-
It is the integrated compression depth over time.
|
|
77
|
-
squeeze_duration is the COUNT; squeeze_energy is the MAGNITUDE.
|
|
78
|
-
Use duration to track progression; use energy for trade assessment.
|
|
79
|
-
|
|
80
|
-
indicators.regime | CONTEXT
|
|
81
|
-
IF regime = CONSOL AND squeeze_duration > 20
|
|
82
|
-
→ Both regime and volatility confirm sustained compression.
|
|
83
|
-
IF regime shifts from CONSOL to BREAKOUT AND squeeze_duration was > 20
|
|
84
|
-
→ The squeeze has been significant and the breakout is more likely
|
|
85
|
-
to produce a sustained move.
|
|
86
|
-
|
|
87
|
-
--------------------------------------------------------------------------------
|
|
88
|
-
DEPENDENCY ORDER
|
|
89
|
-
--------------------------------------------------------------------------------
|
|
90
|
-
1 If squeeze_duration = 0: no active squeeze; no buildup to evaluate.
|
|
91
|
-
2 Read volatility_squeeze for current depth.
|
|
92
|
-
3 Read squeeze_energy for integrated depth × time.
|
|
93
|
-
4 Classify duration (short/moderate/extended) per ranges above.
|
|
94
|
-
5 Regime for compression/breakout context.
|
|
95
|
-
|
|
96
|
-
--------------------------------------------------------------------------------
|
|
97
|
-
INVALIDATION CONDITIONS
|
|
98
|
-
--------------------------------------------------------------------------------
|
|
99
|
-
No specific invalidation beyond the parent volatility_squeeze indicator.
|
|
100
|
-
If volatility_squeeze is in warm-up (< 50 ticks since reset), squeeze_duration
|
|
101
|
-
may show extended values from the warm-up period. Treat as unreliable.
|
|
102
|
-
|
|
103
|
-
--------------------------------------------------------------------------------
|
|
104
|
-
ANTI-PATTERNS — DETECTABLE MISUSE CONDITIONS
|
|
105
|
-
--------------------------------------------------------------------------------
|
|
106
|
-
IF squeeze_duration > 60 is treated as urgency to enter a trade
|
|
107
|
-
→ INCORRECT TIMING LOGIC. Long squeeze duration means energy has been
|
|
108
|
-
building — it does NOT tell you when the release will occur. A squeeze
|
|
109
|
-
can persist for 200+ ticks. Duration informs the MAGNITUDE of the
|
|
110
|
-
expected move when it occurs, not the TIMING.
|
|
111
|
-
|
|
112
|
-
IF squeeze_duration resets to 0 is missed and old duration is used
|
|
113
|
-
→ DATA FRESHNESS CHECK REQUIRED. squeeze_duration resets immediately
|
|
114
|
-
when volatility_squeeze >= 0.8. If you are caching the prior reading,
|
|
115
|
-
you may be working with stale duration data. Always re-read per tick.
|
|
@@ -1,128 +0,0 @@
|
|
|
1
|
-
================================================================================
|
|
2
|
-
INDICATOR: SQUEEZE_ENERGY — VOLATILITY SQUEEZE ENERGY
|
|
3
|
-
================================================================================
|
|
4
|
-
id: squeeze_energy
|
|
5
|
-
data_field: indicators.squeeze_energy
|
|
6
|
-
type: NUMERIC
|
|
7
|
-
range: [0, ∞) — resets to 0 whenever squeeze breaks
|
|
8
|
-
precision: 3 decimal places
|
|
9
|
-
update_rate: per_tick
|
|
10
|
-
latency_profile: COINCIDENT
|
|
11
|
-
|
|
12
|
-
--------------------------------------------------------------------------------
|
|
13
|
-
CONSTRUCT
|
|
14
|
-
--------------------------------------------------------------------------------
|
|
15
|
-
squeeze_energy is the integrated measure of volatility compression, capturing
|
|
16
|
-
both HOW LONG and HOW DEEPLY the volatility has been squeezed. It combines the
|
|
17
|
-
time (duration) and depth (compression magnitude) of the current squeeze.
|
|
18
|
-
|
|
19
|
-
Formula (computed each tick while squeeze is active):
|
|
20
|
-
compressionDepth = 0.8 - indicators.volatility_squeeze
|
|
21
|
-
(positive only when volatility_squeeze < 0.8; deeper = larger value)
|
|
22
|
-
|
|
23
|
-
squeeze_energy = squeeze_duration × compressionDepth
|
|
24
|
-
= squeeze_duration × (0.8 - volatility_squeeze)
|
|
25
|
-
|
|
26
|
-
IF volatility_squeeze >= 0.8:
|
|
27
|
-
squeeze_energy = 0 (reset simultaneously with squeeze_duration)
|
|
28
|
-
|
|
29
|
-
Examples:
|
|
30
|
-
- Duration=10, squeeze_value=0.5: energy = 10 × 0.3 = 3.0
|
|
31
|
-
- Duration=30, squeeze_value=0.5: energy = 30 × 0.3 = 9.0 (3× longer)
|
|
32
|
-
- Duration=10, squeeze_value=0.2: energy = 10 × 0.6 = 6.0 (2× deeper)
|
|
33
|
-
- Duration=30, squeeze_value=0.2: energy = 30 × 0.6 = 18.0 (most energy)
|
|
34
|
-
|
|
35
|
-
squeeze_energy is the single best summary of "how much potential energy has built
|
|
36
|
-
up in this squeeze". It is zero when no squeeze is active and grows as long as
|
|
37
|
-
the squeeze persists.
|
|
38
|
-
|
|
39
|
-
--------------------------------------------------------------------------------
|
|
40
|
-
RANGE INTERPRETATION
|
|
41
|
-
--------------------------------------------------------------------------------
|
|
42
|
-
value = 0
|
|
43
|
-
No active squeeze OR squeeze just started. No meaningful energy accumulation.
|
|
44
|
-
|
|
45
|
-
value 0.1 - 3.0
|
|
46
|
-
Low energy. Short and/or shallow squeeze. Potential move is not yet
|
|
47
|
-
significant by historical comparison. Continue monitoring.
|
|
48
|
-
|
|
49
|
-
value 3.0 - 10.0
|
|
50
|
-
Moderate energy. Sufficient compression has built to support a meaningful
|
|
51
|
-
directional breakout when it occurs. This band represents most "ready to
|
|
52
|
-
break" squeeze setups.
|
|
53
|
-
|
|
54
|
-
value 10.0 - 25.0
|
|
55
|
-
High energy. Significant compression over extended duration and/or depth.
|
|
56
|
-
The breakout when it occurs is more likely to produce an outsized move.
|
|
57
|
-
This is an alert-level condition.
|
|
58
|
-
|
|
59
|
-
value > 25.0
|
|
60
|
-
Very high energy. Extreme sustained compression. Very rare in normal markets.
|
|
61
|
-
When seen, the eventual breakout should be expected to be substantial.
|
|
62
|
-
Activity_ratio and volume_change_point conditions at release are key.
|
|
63
|
-
|
|
64
|
-
--------------------------------------------------------------------------------
|
|
65
|
-
INDICATOR RELATIONSHIPS
|
|
66
|
-
--------------------------------------------------------------------------------
|
|
67
|
-
indicators.volatility_squeeze | REQUIRED_COMPANION
|
|
68
|
-
squeeze_energy is derived from volatility_squeeze depth.
|
|
69
|
-
Always verify volatility_squeeze is in squeeze state (< 0.8) alongside
|
|
70
|
-
any positive squeeze_energy reading.
|
|
71
|
-
|
|
72
|
-
indicators.squeeze_duration | COMPANION
|
|
73
|
-
Together with squeeze_duration, these three indicators form the complete
|
|
74
|
-
squeeze picture:
|
|
75
|
-
volatility_squeeze = current depth (real-time)
|
|
76
|
-
squeeze_duration = time in compression (tick count)
|
|
77
|
-
squeeze_energy = integrated depth × time (summary measure)
|
|
78
|
-
|
|
79
|
-
indicators.volume_change_point | ALERT COMPANION
|
|
80
|
-
When squeeze_energy is high AND volume_change_point.changePointProbability
|
|
81
|
-
is rising, it signals that the volume regime may be shifting — potentially
|
|
82
|
-
the initiation of the squeeze release. High energy + volume regime shift
|
|
83
|
-
is the most actionable combination.
|
|
84
|
-
|
|
85
|
-
indicators.market_structure | CONTEXT
|
|
86
|
-
IF squeeze_energy > 10 AND market_structure transitions to BREAKING_UP
|
|
87
|
-
or BREAKING_DOWN → the breakout is coming from a high-energy compressed
|
|
88
|
-
state. Highest conviction continuation expected.
|
|
89
|
-
|
|
90
|
-
indicators.hmi | POST-SQUEEZE DIRECTION
|
|
91
|
-
After squeeze_energy resets to 0 (squeeze broke), read hmi to determine
|
|
92
|
-
which direction the energy released in. This is the critical post-squeeze
|
|
93
|
-
directional inference step.
|
|
94
|
-
|
|
95
|
-
indicators.activity_ratio | TRIGGER COMPANION
|
|
96
|
-
IF squeeze_energy > 10 AND activity_ratio transitions from MODERATE/DEAD
|
|
97
|
-
to ACTIVE → new volume entering a compressed market. This is the most
|
|
98
|
-
common trigger for a squeeze release.
|
|
99
|
-
|
|
100
|
-
--------------------------------------------------------------------------------
|
|
101
|
-
DEPENDENCY ORDER
|
|
102
|
-
--------------------------------------------------------------------------------
|
|
103
|
-
1 If squeeze_energy = 0: no active squeeze; no energy has accumulated.
|
|
104
|
-
2 Read volatility_squeeze for current depth.
|
|
105
|
-
3 Read squeeze_duration for elapsed time.
|
|
106
|
-
4 Classify energy level per ranges above.
|
|
107
|
-
5 Monitor volume_change_point for rising changepoint probability.
|
|
108
|
-
6 Post-reset (squeeze broke): read hmi for direction of energy release.
|
|
109
|
-
|
|
110
|
-
--------------------------------------------------------------------------------
|
|
111
|
-
INVALIDATION CONDITIONS
|
|
112
|
-
--------------------------------------------------------------------------------
|
|
113
|
-
All invalidations from volatility_squeeze apply.
|
|
114
|
-
IF volatility_squeeze is in warm-up: squeeze_energy from that period is
|
|
115
|
-
unreliable.
|
|
116
|
-
|
|
117
|
-
--------------------------------------------------------------------------------
|
|
118
|
-
ANTI-PATTERNS — DETECTABLE MISUSE CONDITIONS
|
|
119
|
-
--------------------------------------------------------------------------------
|
|
120
|
-
IF high squeeze_energy is used as a directional indicator
|
|
121
|
-
→ INCORRECT. squeeze_energy tells you that a move is more likely to
|
|
122
|
-
be large when it comes. It says nothing about direction.
|
|
123
|
-
Only post-release hmi and regime provide direction.
|
|
124
|
-
|
|
125
|
-
IF squeeze_energy is monitored but release detection is missed
|
|
126
|
-
→ WATCH FOR RESET. When squeeze_energy drops from a high value to 0,
|
|
127
|
-
the squeeze has broken. The next readings of hmi and regime provide
|
|
128
|
-
the directional interpretation of the released energy.
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
================================================================================
|
|
2
|
-
INDICATOR: TF_ALIGNMENT — TIMEFRAME ALIGNMENT SCORE
|
|
3
|
-
================================================================================
|
|
4
|
-
id: tf_alignment
|
|
5
|
-
data_field: indicators.tf_alignment
|
|
6
|
-
type: NUMERIC
|
|
7
|
-
range: 0.0 to 100.0
|
|
8
|
-
precision: 1 decimal place
|
|
9
|
-
update_rate: per_tick
|
|
10
|
-
latency_profile: COINCIDENT
|
|
11
|
-
|
|
12
|
-
--------------------------------------------------------------------------------
|
|
13
|
-
CONSTRUCT
|
|
14
|
-
--------------------------------------------------------------------------------
|
|
15
|
-
tf_alignment measures what percentage of short-term timeframe momentum is moving
|
|
16
|
-
in the same direction as the macro (longer-term) trend.
|
|
17
|
-
|
|
18
|
-
Computation:
|
|
19
|
-
STEP 1: Determine macro direction using 4h, 6h, 8h, 12h, 24h changes only.
|
|
20
|
-
macroDir = sign(sum of those 5 TF changes) ∈ {-1, 0, 1}
|
|
21
|
-
|
|
22
|
-
STEP 2: For each short TF [1m, 3m, 5m, 15m, 30m, 1h, 2h], compute the
|
|
23
|
-
magnitude-weighted contribution toward or against macroDir.
|
|
24
|
-
|
|
25
|
-
Weights applied per TF (decaying):
|
|
26
|
-
1m: 1.00 | 3m: 0.95 | 5m: 0.90 | 15m: 0.85
|
|
27
|
-
30m: 0.80 | 1h: 0.75 | 2h: 0.65
|
|
28
|
-
|
|
29
|
-
For each short TF:
|
|
30
|
-
contribution = |change| × weight
|
|
31
|
-
IF sign(change) == macroDir: adds to alignedWeight
|
|
32
|
-
always adds to totalWeight
|
|
33
|
-
|
|
34
|
-
value = (alignedWeight / totalWeight) × 100
|
|
35
|
-
|
|
36
|
-
Special case: IF all short TFs are near zero (totalWeight ≈ 0):
|
|
37
|
-
Fall back to sign-agreement count rather than magnitude weighting.
|
|
38
|
-
|
|
39
|
-
tf_alignment specifically measures whether SHORTER timeframes (1m–2h) are
|
|
40
|
-
agreeing with the LONGER timeframe direction (4h–24h). It does NOT measure
|
|
41
|
-
whether all 12 TFs agree with each other.
|
|
42
|
-
|
|
43
|
-
A value of 100 means every short TF is moving in the same direction as the
|
|
44
|
-
macro trend. A value of 0 means every short TF is moving against the macro.
|
|
45
|
-
A value of 50 means perfectly split.
|
|
46
|
-
|
|
47
|
-
--------------------------------------------------------------------------------
|
|
48
|
-
RANGE INTERPRETATION
|
|
49
|
-
--------------------------------------------------------------------------------
|
|
50
|
-
value > 85
|
|
51
|
-
Extreme alignment. Every short timeframe contribution is directionally
|
|
52
|
-
consistent with macro. Short-TF price action is fully confirming the
|
|
53
|
-
longer-term trend. Historically associated with CASCADE and BREAKOUT
|
|
54
|
-
regimes. Maximum breadth state.
|
|
55
|
-
|
|
56
|
-
value > 70 AND value <= 85
|
|
57
|
-
High alignment. Most short-TF magnitude agrees with macro. The trend
|
|
58
|
-
has broad participation from intraday timeframes. Strong confirmation
|
|
59
|
-
of macro direction from the shorter stack.
|
|
60
|
-
|
|
61
|
-
value > 55 AND value <= 70
|
|
62
|
-
Moderate alignment. Majority of short-TF weight is directionally aligned,
|
|
63
|
-
but meaningful dissent exists. Some shorter TFs are countertrending.
|
|
64
|
-
Likely reflects normal pullbacks or consolidation within an established trend.
|
|
65
|
-
|
|
66
|
-
value > 40 AND value <= 55
|
|
67
|
-
Low alignment. Roughly split between short TFs agreeing and disagreeing
|
|
68
|
-
with macro. Directional inference is unreliable. The short-TF stack is
|
|
69
|
-
not confirming OR refuting the macro trend.
|
|
70
|
-
|
|
71
|
-
value <= 40
|
|
72
|
-
Divergence. The short-TF stack is predominantly moving AGAINST the macro
|
|
73
|
-
direction. This can represent:
|
|
74
|
-
- A reversal forming at the short-TF level
|
|
75
|
-
- A countertrend move before macro reasserts
|
|
76
|
-
- Transition period between regimes
|
|
77
|
-
Do not use macro-aligned directional signals during this state.
|
|
78
|
-
|
|
79
|
-
--------------------------------------------------------------------------------
|
|
80
|
-
TRAJECTORY — RATE OF CHANGE
|
|
81
|
-
--------------------------------------------------------------------------------
|
|
82
|
-
# tf_alignment does not have its own velocity field in the data feed.
|
|
83
|
-
# Assess trajectory by comparing consecutive readings or using hmi_velocity
|
|
84
|
-
# as a proxy (they tend to move together at turns).
|
|
85
|
-
|
|
86
|
-
Rising tf_alignment (→ recent readings higher than prior)
|
|
87
|
-
Short TFs are converging toward macro direction.
|
|
88
|
-
Alignment is broadening. Associated with momentum building.
|
|
89
|
-
|
|
90
|
-
Falling tf_alignment (→ recent readings lower than prior)
|
|
91
|
-
Short TFs are diverging from macro direction.
|
|
92
|
-
Alignment is narrowing. Associated with momentum fading or pullback.
|
|
93
|
-
|
|
94
|
-
tf_alignment < 50 while hmi is still positive
|
|
95
|
-
Short TFs have turned against macro. HMI is lagging.
|
|
96
|
-
The current HMI value overstates current alignment state.
|
|
97
|
-
|
|
98
|
-
--------------------------------------------------------------------------------
|
|
99
|
-
INDICATOR RELATIONSHIPS
|
|
100
|
-
--------------------------------------------------------------------------------
|
|
101
|
-
indicators.hmi | AMPLIFIES
|
|
102
|
-
tf_alignment measures breadth; hmi measures magnitude.
|
|
103
|
-
These are different but complementary dimensions of the same stack.
|
|
104
|
-
|
|
105
|
-
IF hmi >= 60 AND tf_alignment >= 80
|
|
106
|
-
→ Maximum signal quality. Both magnitude and breadth confirm direction.
|
|
107
|
-
|
|
108
|
-
IF hmi >= 60 AND tf_alignment < 50
|
|
109
|
-
→ HMI has high weighted sum but short TFs are not broadly aligned.
|
|
110
|
-
The high magnitude is concentrated — likely the 1h/2h TFs are
|
|
111
|
-
dominant while others are flat or opposing. Reduce confidence.
|
|
112
|
-
|
|
113
|
-
IF hmi < 30 AND tf_alignment > 70
|
|
114
|
-
→ High breadth but low magnitude. Many TFs agree on direction but
|
|
115
|
-
none have meaningful momentum yet. Low-energy directional state.
|
|
116
|
-
|
|
117
|
-
indicators.regime | CROSS_VALIDATE
|
|
118
|
-
CASCADE and BREAKOUT regimes imply tf_alignment should be >= 70.
|
|
119
|
-
IF regime = CASCADE_UP AND tf_alignment < 55:
|
|
120
|
-
→ Data may be stale or the regime transition just occurred.
|
|
121
|
-
Monitor for convergence.
|
|
122
|
-
|
|
123
|
-
IF regime = CHOP AND tf_alignment is near 50:
|
|
124
|
-
→ Expected. Both indicators consistently reflect disagreement.
|
|
125
|
-
|
|
126
|
-
indicators.directional_efficiency | COMPANION
|
|
127
|
-
tf_alignment measures directional breadth relative to macro.
|
|
128
|
-
directional_efficiency measures how cleanly price is moving in one
|
|
129
|
-
direction (low noise). They are complementary: high alignment +
|
|
130
|
-
high efficiency = strongest trending signal.
|
|
131
|
-
|
|
132
|
-
--------------------------------------------------------------------------------
|
|
133
|
-
DEPENDENCY ORDER
|
|
134
|
-
--------------------------------------------------------------------------------
|
|
135
|
-
1 Regime: if CHOP/CONSOL/RANGING, macro direction is undefined; tf_alignment
|
|
136
|
-
near 50 is expected and uninformative.
|
|
137
|
-
2 Read value and range bucket.
|
|
138
|
-
3 Cross-validate with hmi for magnitude-breadth divergence.
|
|
139
|
-
4 Assess recent trajectory (rising vs falling alignment) if consecutive
|
|
140
|
-
readings are available.
|
|
141
|
-
|
|
142
|
-
--------------------------------------------------------------------------------
|
|
143
|
-
INVALIDATION CONDITIONS
|
|
144
|
-
--------------------------------------------------------------------------------
|
|
145
|
-
IF regime = CHOP
|
|
146
|
-
→ macroDir is undefined (sum of 4h-24h changes is near zero).
|
|
147
|
-
tf_alignment near 50 is expected and uninformative.
|
|
148
|
-
|
|
149
|
-
IF all TF changes are near zero (very low volatility / illiquid period)
|
|
150
|
-
→ Magnitude weighting collapses to sign agreement. Result is noisy.
|
|
151
|
-
Cross-check with activity_ratio. If activity_ratio < 0.5: discard.
|
|
152
|
-
|
|
153
|
-
--------------------------------------------------------------------------------
|
|
154
|
-
ANTI-PATTERNS — DETECTABLE MISUSE CONDITIONS
|
|
155
|
-
--------------------------------------------------------------------------------
|
|
156
|
-
IF tf_alignment is used as a standalone direction signal
|
|
157
|
-
→ INCORRECT USE. tf_alignment measures alignment WITH macro direction.
|
|
158
|
-
It cannot tell you what macro direction is. You must know macroDir
|
|
159
|
-
(from the 4h-24h cluster) separately before interpreting alignment
|
|
160
|
-
as bullish or bearish context.
|
|
161
|
-
|
|
162
|
-
IF tf_alignment of 80% is interpreted as "80% of timeframes are positive"
|
|
163
|
-
→ INCORRECT INTERPRETATION. The percentage is MAGNITUDE-WEIGHTED alignment
|
|
164
|
-
with macro — not a head count of positive timeframes. A single 1h TF
|
|
165
|
-
with high magnitude can dominate the weighted result.
|