OPEN-SOURCE SCRIPT

Gyspy Bot Trade Engine - V1.2B - Strategy 12-7-25 - SignalLynx

119
Gypsy Bot Trade Engine (MK6 V1.2B) - Ultimate Strategy & Backtest

Brought to you by Signal Lynx | Automation for the Night-Shift Nation 🌙

1. Executive Summary & Architecture

Gypsy Bot (MK6 V1.2B) is not merely a strategy; it is a massive, modular Trade Engine built specifically for the TradingView Pine Script environment. While most strategies rely on a single dominant indicator (like an RSI cross or a MACD flip) to generate signals, Gypsy Bot functions as a sophisticated Consensus Algorithm.

The engine calculates data from up to 12 distinct Technical Analysis Modules simultaneously on every bar closing. It aggregates these signals into a "Vote Count" and only executes a trade entry when a user-defined threshold of concurring signals is met. This "Voting System" acts as a noise filter, requiring multiple independent mathematical models—ranging from volume flow and momentum to cyclical harmonics and trend strength—to agree on market direction before capital is committed.

Beyond entries, Gypsy Bot features a proprietary Risk Management suite called the Dump Protection Team (DPT). This logic layer operates independently of the entry modules, specifically scanning for "Moon" (Parabolic) or "Nuke" (Crash) volatility events to force-exit positions, overriding standard stops to preserve capital during Black Swan events.

2. ⚠️ The Philosophy of "Curve Fitting" (Must Read)

One must be careful when applying Gypsy Bot to new pairs or charts.

To be fully transparent: Gypsy Bot is, by definition, a very advanced curve-fitting engine. Because it grants the user granular control over 12 modules, dozens of thresholds, and specific voting requirements, it is extremely easy to "over-fit" the data. You can easily toggle switches until the backtest shows a 100% win rate, only to have the strategy fail immediately in live markets because it was tuned to historical noise rather than market structure.

To use this engine successfully, you must adopt a specific optimization mindset:

Ignore Raw Net Profit: Do not tune for the highest dollar amount. A strategy that makes $1M in the backtest but has a 40% drawdown is useless.

Prioritize Stability: Look for a high Profit Factor (1.5+), a high Percent Profitable, and a smooth equity curve.

Regular Maintenance is Mandatory: Markets shift regimes (e.g., from Bull Trend to Crab Range). Parameters that worked perfectly in 2021 may fail in 2024. Gypsy Bot settings should be reviewed and adjusted at regular intervals (e.g., quarterly) to ensure the voting logic remains aligned with current market volatility.

Timeframe Recommendations:
Gypsy Bot is optimized for High Time Frame (HTF) trend following. It generally produces the most reliable results on charts ranging from 1-Hour to 12-Hours, with the 4-Hour timeframe historically serving as the "sweet spot" for most major cryptocurrency assets.

3. The Voting Mechanism: How Entries Are Generated

The heart of the Gypsy Bot engine is the ActivateOrders input (found in the "Order Signal Modifier" settings).

The engine constantly monitors the output of all enabled Modules.

Long Votes: GoLongCount

Short Votes: GoShortCount

If you have 10 Modules enabled, and you set ActivateOrders to 7:

The engine will ONLY trigger a Buy Entry if 7 or more modules return a valid "Buy" signal on the same closed candle.

If only 6 modules agree, the trade is rejected.

This allows you to mix "Leading" indicators (Oscillators) with "Lagging" indicators (Moving Averages) to create a high-probability entry signal that requires momentum, volume, and trend to all be in alignment.

4. Technical Deep Dive: The 12 Modules

Gypsy Bot allows you to toggle the following modules On/Off individually to suit the asset you are trading.

Module 1: Modified Slope Angle (MSA)

Logic: Calculates the geometric angle of a moving average relative to the timeline.

Function: It filters out "lazy" trends. A trend is only considered valid if the slope exceeds a specific steepness threshold. This helps avoid entering trades during weak drifts that often precede a reversal.

Module 2: Correlation Trend Indicator (CTI)

Logic: Based on John Ehlers' work, this measures how closely the current price action correlates to a straight line (a perfect trend).

Function: It outputs a confidence score (-1 to 1). Gypsy Bot uses this to ensure that we are not just moving up, but moving up with high statistical correlation, reducing fake-outs.

Module 3: Ehlers Roofing Filter

Logic: A sophisticated spectral filter that combines a High-Pass filter (to remove long-term drift) with a Super Smoother (to remove high-frequency noise).

Function: It attempts to isolate the "Roof" of the price action. It is excellent at catching cyclical turning points before standard moving averages react.

Module 4: Forecast Oscillator

Logic: Uses Linear Regression forecasting to predict where price "should" be relative to where it is.

Function: When the Forecast Oscillator crosses its zero line, it indicates that the regression trend has flipped. We offer both "Aggressive" and "Conservative" calculation modes for this module.

Module 5: Chandelier ATR Stop

Logic: A volatility-based trend follower that hangs a "leash" (ATR multiple) from the highest high (for longs) or lowest low (for shorts).

Function: Used here as an entry filter. If price is above the Chandelier line, the trend is Bullish. It also includes a "Bull/Bear Qualifier" check to ensure structural support.

Module 6: Crypto Market Breadth (CMB)

Logic: This is a macro-filter. It pulls data from multiple major tickers (BTC, ETH, and Perpetual Contracts) across different exchanges.

Function: It calculates a "Market Health" percentage. If Bitcoin is rising but the rest of the market is dumping, this module can veto a trade, ensuring you don't buy into a "fake" rally driven by a single asset.

Module 7: Directional Index Convergence (DIC)

Logic: Analyzes the convergence/divergence between Fast and Slow Directional Movement indices.

Function: Identifies when trend strength is expanding. A buy signal is generated only when the positive directional movement overpowers the negative movement with expanding momentum.

Module 8: Market Thrust Indicator (MTI)

Logic: A volume-weighted breadth indicator. It uses Advance/Decline data and Up/Down Volume data.

Function: This is one of the most powerful modules. It confirms that price movement is supported by actual volume flow. We recommend using the "SSMA" (Super Smoother) MA Type for the cleanest signals on the 4H chart.

Module 9: Simple Ichimoku Cloud

Logic: Traditional Japanese trend analysis using the Tenkan-sen and Kijun-sen.

Function: Checks for a "Kumo Breakout." Price must be fully above the Cloud (for longs) or below it (for shorts). This is a classic "trend confirmation" module.

Module 10: Simple Harmonic Oscillator

Logic: Analyzes the harmonic wave properties of price action to detect cyclical tops and bottoms.

Function: Serves as a counter-trend or early-reversal detector. It tries to identify when a cycle has bottomed out (for buys) or topped out (for sells) before the main trend indicators catch up.

Module 11: HSRS Compression / Super AO

Logic: Two options in one.

HSRS: Hirashima Sugita Resistance Support. Detects volatility compression (squeezes) relative to dynamic support/resistance bands.

Super AO: A combination of the Awesome Oscillator and SuperTrend logic.

Function: Great for catching explosive moves that result from periods of low volatility (consolidation).

Module 12: Fisher Transform (MTF)

Logic: Converts price data into a Gaussian normal distribution.

Function: Identifies extreme price deviations. This module uses Multi-Timeframe (MTF) logic to look at higher-timeframe trends (e.g., looking at the Daily Fisher while trading the 4H chart) to ensure you aren't trading against the major trend.

5. Global Inhibitors (The Veto Power)

Even if 12 out of 12 modules vote "Buy," Gypsy Bot performs a final safety check using Global Inhibitors. If any of these are triggered, the trade is blocked.

Bitcoin Halving Logic:

Hardcoded dates for past and projected future Bitcoin halvings (up to 2040).

Trading is inhibited or restricted during the chaotic weeks immediately surrounding a Halving event to avoid volatility crushes.

Miner Capitulation:

Uses Hash Rate Ribbons (Moving averages of Hash Rate).

If miners are capitulating (Shutting down rigs due to unprofitability), the engine flags a "Bearish" regime and can flip logic to Short-only or flat.

ADX Filter (Flat Market Protocol):

If the Average Directional Index (ADX) is below a specific threshold (e.g., 20), the market is deemed "Flat/Choppy." The bot will refuse to open trend-following trades in a flat market.

CryptoCap Trend:

Checks the total Crypto Market Cap chart. If the broad market is in a downtrend, it can inhibit Long entries on individual altcoins.

6. Risk Management & The Dump Protection Team (DPT)

Gypsy Bot separates "Entry Logic" from "Risk Management Logic."

Dump Protection Team (DPT)

This is a specialized logic branch designed to save the account during Black Swan events.

Nuke Protection: If the DPT detects a volatility signature consistent with a flash crash, it overrides all other logic and forces an immediate exit.

Moon Protection: If a parabolic pump is detected that violates statistical probability (Bollinger deviations), DPT can force a profit take before the inevitable correction.

Advanced Adaptive Trailing Stop (AATS)

Unlike a static trailing stop (e.g., "trail by 5%"), AATS is dynamic.

Penthouse Level: If price is at the top of the HSRS channel (High Volatility), the stop loosens to allow for wicks.

Dungeon Level: If price is compressed at the bottom, the stop tightens to protect capital.

Staged Take Profits

TP1: Scalp a portion (e.g., 10%) to cover fees and secure a win.

TP2: Take the bulk of profit.

TP3: Leave a "Runner" position with a loose trailing stop to catch "Moon" moves.

7. Recommended Setup Guide

When applying Gypsy Bot to a new chart, follow this sequence:

Set Timeframe: 4 Hours (4H).

Reset: Turn OFF Trailing Stop, Stop Loss, and Take Profits. (We want to see raw entry performance first).

Tune DPT: Adjust "Dump/Moon Protection" inputs first. These have the highest impact on net performance.

Tune Module 8 (MTI): This module is a heavy filter. Experiment with the MA Type (SSMA is recommended).

Select Modules: Enable/Disable modules 1-12 based on the asset's personality (Trending vs. Ranging).

Voting Threshold: Adjust ActivateOrders. A lower number = More Trades (Aggressive). A higher number = Fewer, higher conviction trades (Conservative).

Final Polish: Re-enable Stop Losses, Trailing Stops, and Staged Take Profits to smooth the equity curve and define your max risk per trade.

8. Technical Specs

Engine Version: Pine Script V6

Repainting: This strategy uses Closed Candle data for all Risk Management and Entry decisions. This ensures that Backtest results align closely with real-time behavior (no repainting of historical signals).

Alerts: This script generates Strategy alerts. If you require visual-only alerts, see the source code header for instructions on switching to "Study" (Indicator) mode.

Disclaimer:
This script is a complex algorithmic tool for market analysis. Past performance is not indicative of future results. Use this tool to assist your own decision-making, not to replace it.

9. About Signal Lynx

Automation for the Night-Shift Nation 🌙

Signal Lynx focuses on helping traders and developers bridge the gap between indicator logic and real-world automation. The same RM engine you see here powers multiple internal systems and templates, including other public scripts like the Super-AO Strategy with Advanced Risk Management.

We provide this code open source under the Mozilla Public License 2.0 (MPL-2.0) to:

Demonstrate how Adaptive Logic and structured Risk Management can outperform static, one-layer indicators

Give Pine Script users a battle-tested RM backbone they can reuse, remix, and extend

If you are looking to automate your TradingView strategies, route signals to exchanges, or simply want safer, smarter strategy structures, please keep Signal Lynx in your search.

License: Mozilla Public License 2.0 (Open Source).
If you make beneficial modifications, please consider releasing them back to the community so everyone can benefit.

Pernyataan Penyangkalan

Informasi dan publikasi ini tidak dimaksudkan, dan bukan merupakan, saran atau rekomendasi keuangan, investasi, trading, atau jenis lainnya yang diberikan atau didukung oleh TradingView. Baca selengkapnya di Ketentuan Penggunaan.