What I have done
Today I tightened several critical edges in the Egis trading system, focusing on correctness over convenience and clarity over silent behavior.
1. Fixed duplicate position blocking logic (core trading safety)
Previously, Egis blocked new order placement if any open position existed for the same symbol, regardless of side.
I refined this rule so that duplication is now checked by the pair:
(symbol + side)
This means:
- LONG + BTCUSDT blocks another LONG + BTCUSDT
- SHORT + BTCUSDT blocks another SHORT + BTCUSDT
- LONG + BTCUSDT no longer blocks SHORT + BTCUSDT (and vice versa)
This aligns the system with real trading intent instead of an overly defensive constraint.
Importantly, the block remains explicit: no silent adjustment, no resizing, no fallback behavior.
2. Preserved positions as the single source of truth
The duplicate check was implemented strictly against the internal positions table:
- Only
OPENpositions are considered - Side/direction is read from the same canonical field used during order creation
- No reliance on Binance state, no UI-time sync, no derived guessing
This reinforces the architectural rule that orders are immutable facts, and positions define reality.
3. Advanced the Zen Pulse short signal into a production-grade indicator
I completed the conceptual conversion from:
- LONG strategy → SHORT strategy → SHORT indicator
The indicator:
- Preserves the full logic of the original strategy (PAC channel, volatility range, RR checks, market structure counting)
- Mirrors direction correctly (HH instead of LL, PAC low instead of PAC high)
- Uses edge-triggered signals to avoid alert spam
- Displays SL / TP cleanly via labels
- Exposes SL / TP values through hidden plots so TradingView alerts can reference them reliably
This makes the indicator usable not just visually, but operationally — alerts now carry actionable context.
4. Enforced plotting discipline for alert correctness
I standardized the indicator layout so:
- Visual plots are stable and predictable
- Hidden plots for Stop and TP always occupy known slots
- Alerts reference
{{plot_11}}and{{plot_12}}consistently
This avoids one of the most common TradingView pitfalls: alerts firing with missing or wrong values due to plot order drift.
What I have learned
1. Over-blocking is as dangerous as under-blocking
The original “block by symbol only” rule felt safe, but it encoded a false assumption:
That holding opposite sides of the same symbol is always invalid.
In practice, that assumption belongs to strategy logic, not system infrastructure.
The system’s job is to enforce consistency, not opinion.
2. Direction is a first-class concept, not a modifier
Side (LONG / SHORT) must be treated as part of an identity key, just like symbol or account.
Any logic that ignores direction eventually collapses into edge-case hacks.
This applies equally to:
- Duplicate detection
- Risk accounting
- Audit commands
- Reporting and UX copy
3. Indicators deserve the same rigor as execution code
It’s easy to treat indicators as “visual only,” but once alerts are involved, they become part of the execution pipeline.
That means:
- Deterministic plots
- Explicit signal edges
- No reliance on implicit TradingView behavior
- Clear mapping between what the chart shows and what the bot will do
4. Calm UX is a side-effect of correct architecture
Nothing today was a “UI feature” in the traditional sense, yet:
- Alerts became clearer
- Signals became more trustworthy
- Blocks became more understandable
- The system became easier to reason about
That reinforces a recurring pattern in Egis:
When the core rules are correct and explicit, the UX naturally becomes calm.
