From 5100d2732b57e8f0ab3c6b61c2dd8274abbde53f Mon Sep 17 00:00:00 2001 From: Sirius Claw Date: Mon, 20 Apr 2026 04:39:49 +0000 Subject: [PATCH 1/4] feat: Add Sirius Mean Reversion Pine Script --- trading/pinescript/README.md | 20 ++++++++ trading/pinescript/SiriusMeanReversion.pine | 52 +++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 trading/pinescript/README.md create mode 100644 trading/pinescript/SiriusMeanReversion.pine diff --git a/trading/pinescript/README.md b/trading/pinescript/README.md new file mode 100644 index 0000000..3ae04db --- /dev/null +++ b/trading/pinescript/README.md @@ -0,0 +1,20 @@ +# Sirius Trading - Pine Scripts + +This directory contains custom algorithmic trading scripts designed for TradingView (Pine Script v5). + +## Scripts + +### 1. `SiriusAITrendMaster.pine` +A robust, trend-following strategy designed for crypto and equities. + +**Core Logic:** +- **Entry:** Uses a Fast/Slow EMA crossover. +- **Filter:** Validates momentum by requiring the price to be above/below the Volume Weighted Average Price (VWAP) before taking the cross. +- **Risk Management:** Implements an automated, dynamic ATR-based trailing stop-loss. + +### 2. `SiriusMeanReversion.pine` +A mean-reversion counter-trend strategy designed to catch over-extended moves in ranging markets. + +**Core Logic:** +- **Entry:** Buys when the price crosses below the lower Bollinger Band and RSI is oversold (< 30). Shorts when price crosses above the upper Bollinger Band and RSI is overbought (> 70). +- **Risk Management:** Uses strict percentage-based Take Profit and Stop Loss limits set via the script inputs. diff --git a/trading/pinescript/SiriusMeanReversion.pine b/trading/pinescript/SiriusMeanReversion.pine new file mode 100644 index 0000000..6f26350 --- /dev/null +++ b/trading/pinescript/SiriusMeanReversion.pine @@ -0,0 +1,52 @@ +// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ +// © Sirius Trading + +//@version=5 +strategy("Sirius Mean Reversion", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10, commission_type=strategy.commission.percent, commission_value=0.05) + +// --- Inputs --- +lengthRSI = input.int(14, title="RSI Length", group="Oscillator") +overbought = input.float(70.0, title="Overbought Level", group="Oscillator") +oversold = input.float(30.0, title="Oversold Level", group="Oscillator") + +bbLength = input.int(20, title="Bollinger Band Length", group="Bands") +bbMult = input.float(2.0, title="Bollinger Band Multiplier", group="Bands") + +tpPercent = input.float(2.0, title="Take Profit (%)", step=0.1, group="Exit Strategy") +slPercent = input.float(1.0, title="Stop Loss (%)", step=0.1, group="Exit Strategy") + +// --- Calculations --- +rsiVal = ta.rsi(close, lengthRSI) +[basis, upper, lower] = ta.bb(close, bbLength, bbMult) + +// --- Plotting --- +plot(basis, "BB Basis", color=color.new(color.white, 50)) +plot(upper, "BB Upper", color=color.new(color.blue, 50)) +plot(lower, "BB Lower", color=color.new(color.blue, 50)) + +// --- Logic --- +longCond = ta.crossunder(close, lower) and rsiVal < oversold +shortCond = ta.crossover(close, upper) and rsiVal > overbought + +// --- Execution --- +var float longEntryPrice = na +var float shortEntryPrice = na + +if (longCond and strategy.position_size == 0) + strategy.entry("Long", strategy.long) + longEntryPrice := close + +if (shortCond and strategy.position_size == 0) + strategy.entry("Short", strategy.short) + shortEntryPrice := close + +// Fixed Percentage Exits +if (strategy.position_size > 0) + longTp = longEntryPrice * (1 + tpPercent / 100) + longSl = longEntryPrice * (1 - slPercent / 100) + strategy.exit("Exit Long", "Long", limit=longTp, stop=longSl) + +if (strategy.position_size < 0) + shortTp = shortEntryPrice * (1 - tpPercent / 100) + shortSl = shortEntryPrice * (1 + slPercent / 100) + strategy.exit("Exit Short", "Short", limit=shortTp, stop=shortSl) From bf57982e2f36f6c41ecb855ca90490f3cc059322 Mon Sep 17 00:00:00 2001 From: Sirius Claw Date: Mon, 20 Apr 2026 04:46:38 +0000 Subject: [PATCH 2/4] fix: make L4 nodepool 24/7 base and add missing gpu_driver_installation_config --- modules/nodepool-gpu.tf | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/nodepool-gpu.tf b/modules/nodepool-gpu.tf index bc5975e..92aa8be 100644 --- a/modules/nodepool-gpu.tf +++ b/modules/nodepool-gpu.tf @@ -3,10 +3,10 @@ resource "google_container_node_pool" "gpu_pool" { location = "us-central1-a" cluster = google_container_cluster.primary.name - initial_node_count = 0 + initial_node_count = 1 autoscaling { - min_node_count = 0 + min_node_count = 1 max_node_count = 1 } @@ -16,6 +16,10 @@ resource "google_container_node_pool" "gpu_pool" { guest_accelerator { type = "nvidia-l4" count = 1 + + gpu_driver_installation_config { + gpu_driver_version = "LATEST" + } } From 0ab2305c1c8146e3cd4a01ea8ff8bf14fc2accd4 Mon Sep 17 00:00:00 2001 From: Sirius Claw Date: Mon, 20 Apr 2026 04:53:22 +0000 Subject: [PATCH 3/4] chore: remove trading scripts from infra repo --- trading/pinescript/README.md | 20 -------- trading/pinescript/SiriusMeanReversion.pine | 52 --------------------- 2 files changed, 72 deletions(-) delete mode 100644 trading/pinescript/README.md delete mode 100644 trading/pinescript/SiriusMeanReversion.pine diff --git a/trading/pinescript/README.md b/trading/pinescript/README.md deleted file mode 100644 index 3ae04db..0000000 --- a/trading/pinescript/README.md +++ /dev/null @@ -1,20 +0,0 @@ -# Sirius Trading - Pine Scripts - -This directory contains custom algorithmic trading scripts designed for TradingView (Pine Script v5). - -## Scripts - -### 1. `SiriusAITrendMaster.pine` -A robust, trend-following strategy designed for crypto and equities. - -**Core Logic:** -- **Entry:** Uses a Fast/Slow EMA crossover. -- **Filter:** Validates momentum by requiring the price to be above/below the Volume Weighted Average Price (VWAP) before taking the cross. -- **Risk Management:** Implements an automated, dynamic ATR-based trailing stop-loss. - -### 2. `SiriusMeanReversion.pine` -A mean-reversion counter-trend strategy designed to catch over-extended moves in ranging markets. - -**Core Logic:** -- **Entry:** Buys when the price crosses below the lower Bollinger Band and RSI is oversold (< 30). Shorts when price crosses above the upper Bollinger Band and RSI is overbought (> 70). -- **Risk Management:** Uses strict percentage-based Take Profit and Stop Loss limits set via the script inputs. diff --git a/trading/pinescript/SiriusMeanReversion.pine b/trading/pinescript/SiriusMeanReversion.pine deleted file mode 100644 index 6f26350..0000000 --- a/trading/pinescript/SiriusMeanReversion.pine +++ /dev/null @@ -1,52 +0,0 @@ -// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ -// © Sirius Trading - -//@version=5 -strategy("Sirius Mean Reversion", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, default_qty_value=10, commission_type=strategy.commission.percent, commission_value=0.05) - -// --- Inputs --- -lengthRSI = input.int(14, title="RSI Length", group="Oscillator") -overbought = input.float(70.0, title="Overbought Level", group="Oscillator") -oversold = input.float(30.0, title="Oversold Level", group="Oscillator") - -bbLength = input.int(20, title="Bollinger Band Length", group="Bands") -bbMult = input.float(2.0, title="Bollinger Band Multiplier", group="Bands") - -tpPercent = input.float(2.0, title="Take Profit (%)", step=0.1, group="Exit Strategy") -slPercent = input.float(1.0, title="Stop Loss (%)", step=0.1, group="Exit Strategy") - -// --- Calculations --- -rsiVal = ta.rsi(close, lengthRSI) -[basis, upper, lower] = ta.bb(close, bbLength, bbMult) - -// --- Plotting --- -plot(basis, "BB Basis", color=color.new(color.white, 50)) -plot(upper, "BB Upper", color=color.new(color.blue, 50)) -plot(lower, "BB Lower", color=color.new(color.blue, 50)) - -// --- Logic --- -longCond = ta.crossunder(close, lower) and rsiVal < oversold -shortCond = ta.crossover(close, upper) and rsiVal > overbought - -// --- Execution --- -var float longEntryPrice = na -var float shortEntryPrice = na - -if (longCond and strategy.position_size == 0) - strategy.entry("Long", strategy.long) - longEntryPrice := close - -if (shortCond and strategy.position_size == 0) - strategy.entry("Short", strategy.short) - shortEntryPrice := close - -// Fixed Percentage Exits -if (strategy.position_size > 0) - longTp = longEntryPrice * (1 + tpPercent / 100) - longSl = longEntryPrice * (1 - slPercent / 100) - strategy.exit("Exit Long", "Long", limit=longTp, stop=longSl) - -if (strategy.position_size < 0) - shortTp = shortEntryPrice * (1 - tpPercent / 100) - shortSl = shortEntryPrice * (1 + slPercent / 100) - strategy.exit("Exit Short", "Short", limit=shortTp, stop=shortSl) From 7d34b3f649f0729950d858775bb374343730ca5e Mon Sep 17 00:00:00 2001 From: Sirius Claw Date: Mon, 20 Apr 2026 05:11:55 +0000 Subject: [PATCH 4/4] fix: match vllm-l4 deployment nodeSelector and tolerations to nodepool labels/taints --- apps/base/customer1/openclaw/vllm-l4.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/base/customer1/openclaw/vllm-l4.yaml b/apps/base/customer1/openclaw/vllm-l4.yaml index f757857..4e78e9a 100644 --- a/apps/base/customer1/openclaw/vllm-l4.yaml +++ b/apps/base/customer1/openclaw/vllm-l4.yaml @@ -16,10 +16,11 @@ spec: app: openclaw-brain-l4 spec: nodeSelector: - cloud.google.com/gke-accelerator: "nvidia-l4" + workload: "llm-analyst" tolerations: - key: "nvidia.com/gpu" - operator: "Exists" + operator: "Equal" + value: "present" effect: "NoSchedule" containers: - name: vllm-brain-l4