रणनीति ऑप्टिमाइज़र: the honest parameter search.
A complete guide to the GOGA Strategy Optimizer — how it searches, what it rejects, and how to read the results. For admins, traders, and curious users. No profit promises, no financial advice.
Educational content. The optimizer runs backtests on historical data — past performance does not guarantee future results. Nothing here is financial advice.
What is the Optimizer?
The Strategy Optimizer is a parameter-search engine for crypto trading strategies. It takes a strategy (like Donchian channels, EMA crossover, RSI reversal), a universe of coins, and a grid or genetic search space — then runs thousands of backtests to find configurations that survive honest testing.
Key principle: the optimizer never lies. It models fees, slippage, leverage, and splits data into In-Sample (IS) for tuning and Out-of-Sample (OOS) for validation. A configuration that looks great on IS but fails on OOS is overfit — and the optimizer tells you so.
деда4 Preset
द деда4 preset button (⚡ in the admin optimizer) sets the search axes to the exact specification from the деда4 requirements:
- Stop-loss: 0.5% → 1.5%, step 0.03%
- Take-profit: 0.5% → 5%, step 0.03%
- Slippage: 10 bps per side (0.1%)
- Max DD cap: 15% (discard)
- Objective: mathematical expectation (avg trade return)
- Mode: genetic, host = niko2
0.5 means 0.5%, not 0.005. This matches how traders think, not how code stores fractions.Slippage Input
द Slippage (bps/side) input controls how much price slippage is modeled per trade side. Default: 10 bps = 0.1% per side, matching деда4. An empty field preserves legacy behavior — old jobs are not repriced.
Slippage is a real cost. A strategy that looks profitable at 0 slippage may be unprofitable at 10 bps. The optimizer applies it symmetrically to entry and exit, in both realistic and plain modes.
Fitness Functions
The optimizer can rank trials by several fitness objectives. Choose the one that matches your goal:
| Objective | What it measures | When to use |
|---|---|---|
is_net | Net profit % | Maximize total return |
is_expectancy | Avg trade return | деда4 default — reward per trade |
sharpe | Return / volatility | Smoother equity curve |
sortino | Downside-only Sharpe | Asymmetric risk |
calmar | Annual return / max DD | Reward per unit of pain |
profit_factor | Gross profit / gross loss | Winners must outweigh losers |
fitness | Composite score + hard gates | Balanced default |
Sortino and expectancy are now written to trail columns (both IS and OOS), visible in the results table and CSV export.
Max DD Cap (discard)
द Max DD % (discard) input sets a hard cap on account drawdown. Default: 15%. A coin whose IS drawdown exceeds the cap is failed and discarded — its trial gets objective = NULL and can never be a winner. This is the деда4 rule: "iterations that don't pass are thrown away."
dd_cap_exceeded = true). Validate is the truth report; the gate already punishes drawdown.Strategy Parameter Optimization
Beyond exit parameters (stop, target, trail), the optimizer can search entry parameters — the strategy's own periods and thresholds. The launch form pulls the catalog from the strategy registry (60 strategies) and draws Start/Step/Stop rows for the selected strategy's parameters:
- Donchian:
n(channel period) - EMA crossover:
e_fast,e_slow - RSI reversal:
rsi_period,rsi_lo,rsi_hi
The gene carries these as e_fast etc. The Before→After equity chart honestly recomputes the signal with the new parameters. Verified: e_fast=5 produced 79 trades vs 38 for the base config — a real change, not a cosmetic overlay.
2D Heatmap & CSV Export
In the job detail view, two TradingView-style conveniences are available:
- 2D parameter heatmap: two X/Y selectors let you pick any two varying parameters. Each cell shows the best objective across all other params. Discarded (DD-capped) trials are excluded. Green plateaus beat lone bright cells — a smooth green region means the edge is robust.
- CSV export: download all trials (search + validate) with every column — objective, IS/OOS metrics, sortino, expectancy, gene JSON, gate verdict, noise flag. For offline analysis in Excel or Python.
MACD & RSI Indicator Panels
Below the Z-Score panel, MACD and RSI chips show the same math the backtests trade with — _ema / _rsi functions, honest warmup gaps, and a live data tail from Gate.io. These are not decorative indicators; they are the actual signals the strategies use.
By design, Z-Score + MACD/RSI are also available on the user optimizer at /app/optimizer (via login-gated proxy /app/api/*).
Case Study: ATOM
The setup
ATOM (Cosmos) एक गिरता हुआ सिक्का था — बिल्कुल वैसा जैसा अधिकांश व्यापारी टालते हैं। लेकिन Donchian20 दोनों दिशाओं में व्यापार करता है: गिरावट पर शॉर्ट्स लाभ कमाते हैं। गिरता हुआ सिक्का केवल लॉन्ग-ओनली धारक के लिए लाभहीन है।
विजेता कॉन्फ़िगरेशन
| रणनीति | donchian20 @ 4h |
| स्टॉप-लॉस | 5% |
| टेक-प्रॉफिट | 16% |
| ट्रेलिंग स्टॉप | 3% |
| लीवरेज | 3× |
| पहले (बेस पैराम्स) | −361% |
| बाद में (ऑप्टिमाइज़्ड) | +296% |
| OOS (आउट-ऑफ-सैंपल) | +290% |
दो ईमानदार चेतावनियाँ
हमने क्या सीखा (EDGE नॉलेज बेस)
ATOM अभियान से छह शोध नोट्स KB में बीजित हैं (द्विभाषी, DeepSeek के माध्यम से स्वचालित अनुवादित) और सार्वजनिक रूप से दिखाए गए हैं /crypto/ATOM और लैब में:
- शोर स्तर: क्यों Sharpe को √(2·ln N · 365/दिन) साफ करना चाहिए
- पैरामीटर स्थानांतरण: क्यों एक-सिक्का विजेता संदिग्ध हैं
- शुल्क: ema9_21 ने 614 व्यापारों पर 184% मार्जिन खपत किया
- इतिहास गहराई: क्यों 200+ कैंडल न्यूनतम है
- "पहले→बाद में चापलूसी करता है — OOS ही एकमात्र परीक्षा है"
- ड्रॉडाउन ईमानदार हत्या मानदंड के रूप में
User Optimizer
उपलब्ध है /app/optimizer (लॉगिन आवश्यक, मुफ्त):
- "अपने पैरामीटर जांचें" — उसी ईमानदार इंजन (शुल्क, लीवरेज ≤5×, निराशावादी फिल, IS/OOS) के माध्यम से तत्काल बैकटेस्ट। परिणाम: मूल्य + व्यापार, इक्विटी पहले/बाद, Sharpe + Sortino, "✓ डिफॉल्ट को हराता है / ✗ डिफॉल्ट जीतते हैं"।
- इतिहास चलाएं ("मेरे रन"): प्रत्येक रन पैरामीटर, IS/OOS, Sortino के साथ सहेजा गया। एक ↩ बटन पैरामीटर पुनर्स्थापित करता है। दैनिक सीमा: 200 परीक्षण, विफल-बंद।
- "पूर्ण ऑप्टिमाइज़ेशन का अनुरोध करें" — एक पूर्ण खोज में कंप्यूट खर्च होता है, इसलिए अनुरोध ऑपरेटर कतार में जाता है। एडमिन रन पैनल में: "📨 उपयोगकर्ता ऑप्टिमाइज़ेशन अनुरोध" (▶ लॉन्च / ✕ अस्वीकृत / ✓ पूर्ण)।
एक्सेस स्तर
| स्तर | आप क्या देखते हैं | कहाँ |
|---|---|---|
| अनाम | ईमानदार टीज़र: फैसले, "पहले −361% → बाद में +296% PAPER_ONLY", शोध नोट्स, CTA "साइन इन करें — मुफ्त" | /crypto/ATOM |
| साइन इन किया (मुफ्त) | सब कुछ: ट्रेड चार्ट, इक्विटी, सांख्यिकी, सटीक पैरामीटर, उपयोगकर्ता ऑप्टिमाइज़र | /app/optimizer |
| प्रशासक | पूर्ण ऑप्टिमाइज़र: जॉब लॉन्च करें, जेनेटिक खोज, हीटमैप, CSV, प्रीसेट, उपयोगकर्ता अनुरोध कतार | /app/admin/optimizer |
EDGE नॉलेज बेस
द EDGE नॉलेज बेस शोध निष्कर्षों को सार्वजनिक ज्ञान में बदलता है। एक research_notes तालिका द्विभाषी नोट्स (DeepSeek के माध्यम से स्वचालित अनुवादित) संग्रहीत करती है जो सिक्का पृष्ठों और लैब में "शोध नोट्स — हमने क्या सीखा" के रूप में दिखाए जाते हैं।
प्रशासक एकल POST के साथ नए निष्कर्ष जोड़ सकते हैं — अनुवाद स्वचालित है। ATOM अभियान के वर्तमान नोट्स में शामिल हैं: शोर तल, पैरामीटर स्थानांतरण, शुल्क क्षरण, इतिहास गहराई, OOS एकमात्र परीक्षा के रूप में, और ड्रॉडाउन हत्या मानदंड के रूप में।