@senpi/trading-recipe 1.0.37 → 1.0.38
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/examples/strategies/dsl.yaml +52 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: position-tracker
|
|
2
|
+
version: 1.0.0
|
|
3
|
+
description: >
|
|
4
|
+
Onchain position tracker — monitors the strategy wallet on Hyperliquid
|
|
5
|
+
for position lifecycle events (open, close, edit, flip) and wires them
|
|
6
|
+
into the DSL exit engine for automated trailing stop-loss management.
|
|
7
|
+
|
|
8
|
+
# ── STRATEGIES ──
|
|
9
|
+
# Minimal: only wallet address + optional fields (no budget/slots/margin needed)
|
|
10
|
+
strategies:
|
|
11
|
+
tracker:
|
|
12
|
+
wallet: "${WALLET_ADDRESS}"
|
|
13
|
+
enabled: true
|
|
14
|
+
|
|
15
|
+
# ── SCANNERS ──
|
|
16
|
+
scanners:
|
|
17
|
+
- name: position_tracker
|
|
18
|
+
type: position_tracker
|
|
19
|
+
interval: 10s
|
|
20
|
+
|
|
21
|
+
# ── ACTIONS ──
|
|
22
|
+
actions:
|
|
23
|
+
- name: position_tracker_action
|
|
24
|
+
action_type: POSITION_TRACKER
|
|
25
|
+
decision_mode: rule
|
|
26
|
+
scanners: [position_tracker]
|
|
27
|
+
|
|
28
|
+
# ── EXIT (DSL) ──
|
|
29
|
+
exit:
|
|
30
|
+
engine: dsl
|
|
31
|
+
interval_seconds: 30
|
|
32
|
+
dsl_presets:
|
|
33
|
+
default:
|
|
34
|
+
phase1:
|
|
35
|
+
enabled: true
|
|
36
|
+
max_loss_pct: 3.0
|
|
37
|
+
retrace_threshold: 7
|
|
38
|
+
consecutive_breaches_required: 3
|
|
39
|
+
phase2_trigger_tier: 0
|
|
40
|
+
phase2:
|
|
41
|
+
enabled: true
|
|
42
|
+
retrace_threshold: 1.5
|
|
43
|
+
consecutive_breaches_required: 1
|
|
44
|
+
tiers:
|
|
45
|
+
- { trigger_pct: 7, lock_hw_pct: 40, breaches: 3 }
|
|
46
|
+
- { trigger_pct: 12, lock_hw_pct: 55, breaches: 2 }
|
|
47
|
+
- { trigger_pct: 15, lock_hw_pct: 75, breaches: 2 }
|
|
48
|
+
- { trigger_pct: 20, lock_hw_pct: 85, breaches: 1 }
|
|
49
|
+
|
|
50
|
+
# ── NOTIFICATIONS ──
|
|
51
|
+
notifications:
|
|
52
|
+
telegram_chat_id: "${TELEGRAM_CHAT_ID}"
|
package/openclaw.plugin.json
CHANGED