OPEN-SOURCE SCRIPT

TitanGrid L/S SuperEngine

486
TitanGrid L/S SuperEngine
Experimental Trend-Aligned Grid Signal Engine for Long & Short Execution

🔹Overview
TitanGrid is an advanced, real-time signal engine built around a tactical grid structure.
It manages Long and Short trades using trend-aligned entries, layered scaling, and partial exits.
Unlike traditional strategy()-based scripts, TitanGrid runs as an indicator(), but includes its own full internal simulation engine.
This allows it to track capital, equity, PnL, risk exposure, and trade performance bar-by-bar — effectively simulating a custom backtest, while remaining compatible with real-time alert-based execution systems.
The concept was born from the fusion of two prior systems:
Assassin’s Grid (grid-based execution and structure) + Super 8 (trend-filtering, smart capital logic), both developed under the AssassinsGrid framework.

🔹Disclaimer
This is an experimental tool intended for research, testing, and educational use.
It does not provide guaranteed outcomes and should not be interpreted as financial advice.
Use with demo or simulated accounts before considering live deployment.

🔹Execution Logic
Trend direction is filtered through a custom SuperTrend engine. Once confirmed:
Long entries trigger on pullbacks, exiting progressively as price moves up
Short entries trigger on rallies, exiting as price declines
Grid levels are spaced by configurable percentage width, and entries scale dynamically.

🔹Stop Loss Mechanism
TitanGrid uses a dual-layer stop system:
• A static stop per entry, placed at a fixed percentage distance matching the grid width
• A trend reversal exit that closes the entire position if price crosses the SuperTrend in the opposite direction
Stops are triggered once per cycle, ensuring predictable and capital-aware behavior.

🔹Key Features
• Dual-side grid logic (Long-only, Short-only, or Both)
• SuperTrend filtering to enforce directional bias
• Adjustable grid spacing, scaling, and sizing
• Static and dynamic stop-loss logic
• Partial exits and reset conditions
• Webhook-ready alerts (browser-based automation compatible)
• Internal simulation of equity, PnL, fees, and liquidation levels
• Real-time dashboard for full transparency

🔹Best Use Cases
TitanGrid performs best in structured or mean-reverting environments.
It is especially well-suited to assets with the behavioral profile of ETH — reactive, trend-intraday, and prone to clean pullback formations.
While adaptable to multiple timeframes, it shows strongest performance on the 15-minute chart, offering a balance of signal frequency and directional clarity.

🔹License
Published under the Mozilla Public License 2.0.
You are free to study, adapt, and extend this script.

🔹Panel Reference
The real-time dashboard displays performance metrics, capital state, and position behavior:

Asset Type – Automatically detects the instrument class (e.g., Crypto, Stock, Forex) from symbol metadata
Equity – Total simulated capital: realized PnL + floating PnL + remaining cash
Available Cash – Capital not currently allocated to any position
Used Margin – Capital locked in open trades, based on position size and leverage
Net Profit – Realized gain/loss after commissions and fees
Raw Net Profit – Gross result before trading costs
Floating PnL – Unrealized profit or loss from active positions
ROI – Return on initial capital, including realized and floating PnL. Leverage directly impacts this metric, amplifying both gains and losses relative to account size.
Long/Short Size & Avg Price – Open position sizes and volume-weighted average entry prices
Leverage & Liquidation – Simulated effective leverage and projected liquidation level
Hold – Best-performing hold side (Long or Short) over the session
Hold Efficiency – Performance efficiency during holding phases, relative to capital used
Profit Factor – Ratio of gross profits to gross losses (realized)
Payoff Ratio – Average profit per win / average loss per loss
Win Rate – Percent of profitable closes (including partial exits)
Expectancy – Net average result per closed trade
Max Drawdown – Largest recorded drop in equity during the session
Commission Paid – Simulated trading costs: maker, taker, funding
Long / Short Trades – Count of entry signals per side
Time Trading – Number of bars spent in active positions
Volume / Month – Extrapolated 30-day trading volume estimate
Min Capital – Lowest equity level recorded during the session

🔹Reference Ranges by Strategy Type
Use the following metrics as reference depending on the trading style:

Grid / Mean Reversion
• Profit Factor: 1.2 – 2.0
• Payoff Ratio: 0.5 – 1.2
• Win Rate: 50% – 70% (based on partial exits)
• Expectancy: 0.05% – 0.25%
• Drawdown: Moderate to high
• Commission Impact: High

Trend-Following
• Profit Factor: 1.5 – 3.0
• Payoff Ratio: 1.5 – 3.5
• Win Rate: 30% – 50%
• Expectancy: 0.3% – 1.0%
• Drawdown: Low to moderate

Scalping / High-Frequency
• Profit Factor: 1.1 – 1.6
• Payoff Ratio: 0.3 – 0.8
• Win Rate: 80% – 95%
• Expectancy: 0.01% – 0.05%
• Volume / Month: Very high

Breakout Strategies
• Profit Factor: 1.4 – 2.2
• Payoff Ratio: 1.2 – 2.0
• Win Rate: 35% – 60%
• Expectancy: 0.2% – 0.6%
• Drawdown: Can be sharp after failed breakouts

🔹Note on Performance Simulation
TitanGrid includes internal accounting of fees, slippage, and funding costs.
While its logic is designed for precision and capital efficiency, performance is naturally affected by exchange commissions.
In frictionless environments (e.g., zero-fee simulation), its high-frequency logic could — in theory — extract substantial micro-edges from the market.
However, real-world conditions introduce limits, and all results should be interpreted accordingly.

Feragatname

Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.