GhostRider Strategy Documentation

Version: 2.0.0
Developer: TradeStaq Technologies
Market: Futures

Table of Contents

  1. Overview
  2. Key Features
  3. Configuration Parameters
  4. Strategy Logic Summary
  5. Trading Scenarios
  6. Strategic Mastery & Success Guide

Overview

GhostRider is a precision-based Gunbot strategy designed primarily for futures markets (though configurable). It aims to "predict and ride the market wave" by utilizing a multi-timeframe analysis to identify dynamic support ("Launchpad") and resistance ("Firewall") zones. The strategy employs a combination of advanced trend, momentum, and volume analysis to determine market sentiment (Bullish, Bearish, or Moderate) and executes trades using a sophisticated DCA (Dollar Cost Averaging) and Scalping engine.

Key Features

  • Dynamic Support & Resistance (TradeStaq Zones): The strategy calculates "Launchpad" (Buy) and "Firewall" (Sell) levels across 13 different timeframes (from 15m to 1y). It visualizes these zones to determine optimal entry and exit points.
  • Market Sentiment Analysis: Uses comprehensive long-term market data to categorize the market into Bullish, Bearish, Moderate Bullish, or Moderate Bearish.
  • Smart DCA (Dollar Cost Averaging): Unlike static DCA, GhostRider adjusts its DCA frequency and distance based on market volatility, "Magic Cooldown" timers, and proximity to support zones.
  • Wick Trading: Can optionally target wick entries/exits, attempting to catch price reversals at the extremes of candle shadows.
  • Partial Scalping: Allows for selling portions of a position ("scalping") when profitable while holding the remainder ("bag") for higher targets.
  • Hedge Capabilities: Built-in logic to open hedge positions on a secondary pair to offset risk during adverse market moves.
  • Custom Trailing: Implements internal trailing stop mechanisms for both buying and selling to maximize entries and exits.
  • Dashboard Persistence & Reliability: Dashboard data is now persisted across cycles via an internal background cache, ensuring a stable, flicker-free interface even during license checks or fast execution spins.

Configuration Parameters

The following settings can be configured in the customStratEditor or strategy config.

1. Trade Configuration

Core settings defining how the strategy manages capital and direction.

ParameterDefaultDescription & Examples
TRADE_MODEautoDirectional Logic Control. auto: Scans market structure. If price hits a "Launchpad" and sentiment is Bullish, it initiates a Long. If price hits a "Firewall" and sentiment is Bearish, it initiates a Short. long: Forces the strategy to only look for Long entries (buys at Launchpad). short: Forces the strategy to only look for Short entries (sells at Firewall).
TRADING_LIMIT_TYPEvalueSizing Model. Select value for fixed quote amount or percentage to scale automatically based on a % of your Wallet Balance.
MF_TRADING_LIMIT50Base Trade Size. The quote currency amount (if value) or % of balance (if percentage) used for the initial entry.
OPEN_ORDER_TYPEbaseEntry Currency. Determines if the MF_TRADING_LIMIT is calculated in the base currency (e.g., BTC) or quote currency (e.g., USDT). Example: quote uses USDT amount; base uses BTC amount.
CLOSE_ORDER_TYPEquoteExit Currency. Determines quantity type for closing trades. Example: Usually set to quote to ensure precise USDT value exits.
MF_CAPITAL500Margin Allocation. The total margin assigned to this pair. Used for calculating risk and DCA logic. Example: Set to 1000 if you have a $1000 balance allocated for this pair. Recommended: 100x your Trade Limit.
MIN_VOLUME_TO_SELL0.1Dust Filter. The minimum position size required to execute a close order. Example: If your position is 0.0001 BTC (worth $5) and this is set to 0.001, the bot won't sell.
PERIOD5Reaction Speed. The primary short-term timeframe (in minutes) used for fast decision making. Example: 5 minutes allows quick entries; 15 filters out more noise.
PERIOD_MEDIUM240Trend Confirmation. The medium timeframe (in minutes) used to confirm the trend. Example: 240 (4 Hours) provides a stable trend baseline.
PERIOD_LONG1440Macro Trend. The long timeframe (in minutes) used for overall market direction. Example: 1440 (1 Day) ensures trades align with the daily trend.

[!IMPORTANT] Margin Allocation (MF_CAPITAL): GhostRider is a margin-intensive strategy. It is highly recommended to allocate at least 50x to 100x your MF_TRADING_LIMIT as capital to ensure the bot has enough room for DCA operations during volatile moves.

2. PNL Management

Settings for profit taking, stop losses, and risk management.

ParameterDefaultDescription & Examples
AUTO_GAINtrueDynamic Targets. If true, profit targets are calculated based on market volatility rather than a fixed percentage. Example: In a volatile market, target might be 3%; in a flat market, 0.5%.
MIN_AUTO_PROFIT0.3Profit Floor. The minimum % profit accepted when AUTO_GAIN is active. Example: 0.3 ensures the bot never sells for less than 0.3% profit, even in low volatility.
MIN_AUTO_PARTIAL_PROFIT0.3Scalp Floor. The minimum % profit required to execute a partial sell (scalp). Example: Prevents selling small portions for negligible gains.
PROFIT_QUOTIENT2Target Multiplier. Increases the calculated Auto Gain target. Example: If volatility suggests 1%, a quotient of 2 makes the target 2%. Higher = Greedier.
PARTIAL_PROFIT_QUOTIENT2Scalp Multiplier. Increases the calculated target for partial sells. Example: 1 allows taking partial profits earlier than the full close target.
GAIN2Manual Target. Fixed profit target % used only if AUTO_GAIN is false. Example: 2 means sell at 2% profit every time.
ENABLE_TRAILINGtrueProfit Maximizer. When target is reached, wait for price to peak before selling. Example: Price hits 2% target but keeps rising to 5%. Bot waits.
TRAILING_SPREAD1Trail Distance. The % drop from the peak required to trigger the sell. Example: Price hits 5% peak and drops to 4% (1% drop) -> Sell Triggered.
RIDE_PROFIT_WAVEtrueTrend Holding. If true, the bot attempts to hold the position longer during strong momentum, ignoring early exit signals until a reversal is confirmed.
ENABLE_STOP_LOSSfalseHard Stop Switch. Enables the stop-loss logic.
STOP_LOSS_SELL_TYPEpartialStop Logic. partial: Sells a portion of the bag to reduce risk. full: Closes the entire position (takes full loss).
STOP_LOSS_PERCENTAGE2Stop Trigger. The % loss at which the Stop Loss logic activates. Example: 2 means check for stop loss if position is -2% ROE.
STOP_LOSS_THRESHOLD50Risk Filter. Only triggers Stop Loss if capital usage (margin ratio) exceeds this %. Example: If you only used $10 of your $1000 capital, a -2% drop is ignored. Stop loss activates only when heavily invested.

3. Execution & Automation

Controls for DCA behavior, buying/selling toggles, and multipliers.

ParameterDefaultDescription & Examples
BUY_ENABLEDtrueEntry Switch. Set to false to stop opening new trades or adding to existing ones.
SELL_ENABLEDtrueExit Switch. Set to false to hold positions indefinitely (never sell).
ENABLE_DCAtrueDCA Toggle. If false, the bot will strictly avoid placing any additional buys (DCA) after the initial entry.
STOP_AFTER_SELLfalseOne-Off Mode Mode. If true, the bot stops trading completely after successfully closing a position.
ENABLE_DCA_MULTIPLIERfalseMartingale Logic. If true, DCA orders increase in size based on how deep the price falls.
DCA_MULTIPLIER1Base Multiplier. The minimum multiplier applied to DCA orders. Example: 1.5 makes each subsequent buy 50% larger.
DCA_MULTIPLIER_LEVEL7Depth Trigger. The support level index required to activate the multiplier. Example: 7 means don't increase buy size on small dips (Levels 1-6). Only multiply buys at deep support (Level 7+).
BULLISH_DCA_MULTIPLIER_LEVEL5Bullish Depth Trigger. Same as above, but applied when the market sentiment is Bullish. Example: In a Bull market, multiply buys earlier (at Level 5).
MAX_DCA_MULTIPLIER5Safety Cap. The maximum multiplier allowed for any single order. Example: Limits a single DCA buy to 5x the trading limit, preventing liquidation.
DCA_QUOTIENT1Frequency Limit. Controls how many consecutive buys are allowed in a standard zone. Example: 1 allows only one buy per zone to prevent over-trading.
BATTLEGROUND_DCA_QUOTIENT1Pivot Frequency Limit. Controls buy frequency specifically in the "Battleground" (Pivot) zone. Example: 1 restricts buying near the pivot point.
ENFORCE_DCA_MIN_STEPtrueStep Control. If true, enforces a minimum price distance between DCA orders. Example: Prevents buying twice at $100 and $99.9.
ENABLE_PARTIAL_SELLfalseScalping Switch. Enables selling portions of the position at resistance levels.
STRICT_DCAfalseAggressive DCA. If true, enforces strict indicator checks for DCAs. If false, allows freer buying to save positions.
ENABLE_WICK_TRADEfalseSniper Mode. If true, detects long wicks piercing support and buys immediately.
WICK_TRADE_LEVEL11Wick Sensitivity. Which support level a wick must hit to trigger. Example: 11 requires a wick to hit very deep support (Weekly). 5 would trigger on shallower wicks.
IN_POSITION_MARGIN0State Threshold. Defines the margin usage threshold to consider the bot "in position" for specific trade stages.

4. Technical Indicators & Momentum

Fine-tuning the strategy's reaction to market movements.

ParameterDefaultDescription & Examples
BASE_DCA_PERCENT0.5Minimum Drop. The minimum price drop % required to trigger a DCA buy. Example: 0.5 means price must drop 0.5% below last buy to consider adding.
LAUNCHPAD_TRADE_INDEX4Long Aggressiveness. Controls which timeframe's support is trusted for entry. Example: 1 (15m) buys shallow dips aggressively. 6 (Daily) waits for major corrections before buying.
FIREWALL_TRADE_INDEX4Short Aggressiveness. Same logic as above but for Short entries. Example: 1 shorts minor pumps. 6 waits for major resistance.
LAUNCHPAD_CLOSE_RANGE2Short Exit Point. Defines the support level used to close Shorts. Example: 2 closes shorts at 1-hour support levels.
FIREWALL_CLOSE_RANGE2Long Exit Point. Defines the resistance level used to close Longs. Example: 2 closes longs at 1-hour resistance levels.
MODERATE_BEAR_TRADE_INDEX6Trend Adaptation. If sentiment is Moderate Bearish, ignore buy zones below this index. Example: Forces minimum entry at Daily Support (Index 6) during choppy downturns.
EXTREME_BEAR_TRADE_INDEX7Crash Protection. If sentiment is Extreme Bearish, ignore buy zones below this index. Example: Forces entry only at 3-Day Support (Index 7) during crashes.
DYNAMIC_TRADE_XfalseAuto-Adjustment. If true, automatically increases trade indices based on volatility. Example: If price crashes fast, the bot auto-shifts from looking at 4hr support to Weekly support.
MS100Momentum Sell. Margin ratio % at which the bot force-sells during a pump. Example: If 100% of capital is used and price pumps, sell immediately to secure the bag.
SR30Soft Reduction. Margin ratio % at which the bot begins aggressively selling parts of the bag. Example: If 30% of capital is used, start selling small chunks at break-even or small profit to free up margin.
SCALPING_RATIO10Scalp Cap. Max % of capital allowed for buying in "Upper" (profit) regions. Example: 10 means only use 10% of capital for high-risk scalps above the pivot.
AUTO_SCALPING_QTYfalseSmart Scalping. If true, the bot automatically calculates the optimal amount to sell during a scalp based on market conditions, overriding manual settings. Example: In a strong trend, it might sell less to hold for higher profit; in a weak trend, it sells more to lock in gains.
SCALPING_SELL_AMOUNT0.5Scalp Size. Ratio of position to sell during a standard scalp. Example: 0.5 sells 50% of the bag at resistance.
SCALPING_UPPER_SELL_AMOUNT0.75Aggressive Scalp Size. Ratio to sell during a scalp in upper regions. Example: 0.75 sells 75% of the bag to lock in maximum profit.
IGNORE_TRADES_BEFORE0History Reset. Epoch timestamp. Ignore trades before this date. Example: Use this if you manually sold a bag and want the bot to "forget" the old position history.

5. Hedge Set Up and Parameters

Settings for hedging positions using a secondary pair.

ParameterDefaultDescription & Examples
HEDGE_PAIRUSDT-BTCProtection Pair. The secondary pair used to open hedge positions. Example: If trading ETH, you might hedge with BTC to offset market-wide crashes.
BULL_HEDGE_RATIO0.3Bull Hedge Size. Ratio of hedge size vs main position during Bullish conditions. Example: 0.3 means if main position is $1000, hedge is $300.
BEAR_HEDGE_RATIO0.7Bear Hedge Size. Ratio of hedge size vs main position during Bearish conditions. Example: 0.7 means if main position is $1000, hedge is $700 (stronger protection).
HEDGE_CLOSEfalseAuto Close. If true, the bot will automatically close the hedge position when it reaches profit targets.

Strategy Logic Summary

  1. Zone Calculation: The bot calculates "Launchpad" (Support) and "Firewall" (Resistance) zones by analyzing market highs and lows over various timeframes, ranging from 15 minutes to 1 year.
  2. Entry Logic:
    • Long: The strategy executes a buy order when the price dips into a "Launchpad" zone, provided that momentum analysis shows oversold divergence and the overall market trend is favorable.
    • Short: The strategy executes a sell (short) order when the price rises into a "Firewall" zone and momentum analysis shows overbought divergence.
  3. Smart DCA: If the market moves against an open position, the bot averages down (DCA). The distance between these buy orders is not fixed; it is dynamically calculated based on risk settings, current margin usage, and the distance to the next major support level.
  4. Exit Logic:
    • Full Close: The entire position is closed when the profit target is reached or a trailing stop is triggered.
    • Scalp (Partial): If enabled, the bot sells portions of the position at intermediate resistance levels to lock in small profits while holding the core position ("bag") for the final target.

Trading Scenarios

This section explains how GhostRider reacts to specific market conditions, helping you understand the "why" behind its actions.

Scenario A: The "Launchpad" Reversal (Ideal Long)

  • Market Condition: The market is in a general uptrend but experiences a sudden pullback or dip.
  • Logic: The strategy identifies the market sentiment as Bullish. As the price drops, it hits a calculated support level (e.g., 4-hour support).
  • Bot Action:
    1. The bot detects the price is within a valid Buy Zone.
    2. It waits for momentum analysis to show oversold divergence (indicating downward momentum is fading).
    3. It executes a Buy order.
    4. As the price bounces back up, the Trailing Stop activates once the profit target is met.
    5. The bot rides the wave upward. If the price dips by the configured spread, it closes the full position to secure profit.

Scenario B: The "Firewall" Defense (Bearish Short)

  • Market Condition: The market is in a downtrend, but price rallies briefly (a "dead cat bounce").
  • Logic: The strategy identifies the market sentiment as Bearish. The price pumps up into a calculated resistance level (e.g., 12-hour resistance).
  • Bot Action:
    1. The bot detects the price is within a valid Sell Zone.
    2. It waits for momentum analysis to show overbought divergence (indicating the rally is running out of steam).
    3. It executes a Short order.
    4. If the price continues to pump unexpectedly, the Magic Cooldown feature activates, slowing down subsequent DCA orders to prevent using up margin too quickly.
    5. As the price rejects the resistance and drops, the bot takes profit at the next support level.

Scenario C: The "Wick" Snipe (High Volatility)

  • Market Condition: A sudden flash crash or a liquidity wick where price moves violently and quickly retracts.
  • Configuration: ENABLE_WICK_TRADE is active with high sensitivity.
  • Logic:
    1. The bot detects a candle with a significantly long lower shadow (wick).
    2. This wick penetrates a deep support zone (e.g., 3-day support).
    3. Bot Action: Because the move is extreme, the bot bypasses some standard momentum checks and executes an immediate Snipe Buy to catch the V-shape reversal.
    4. This often results in a quick scalping exit as the candle closes or the price stabilizes.

Scenario D: The "Sideways" Accumulator (Scalping)

  • Market Condition: The market is ranging (moving sideways) between a specific support and resistance level with no clear trend.
  • Configuration: ENABLE_PARTIAL_SELL is active.
  • Logic:
    1. The bot buys at the bottom of the range (Support).
    2. The price rises but struggles to break out of the top of the range (Resistance).
    3. Bot Action: Instead of holding and hoping for a breakout, the bot sells a percentage of the position (e.g., 50%) at the resistance mid-point.
    4. This locks in realized profit ("scalping").
    5. If the price drops back to the entry point, the bot buys again, re-filling the bag. This process repeats, lowering the break-even price with every successful scalp.

Scenario E: The "Hedge" Protector (Crisis Management)

  • Market Condition: You are holding a Long position, but the market crashes hard, shifting the trend to Bearish.
  • Configuration: A HEDGE_PAIR (e.g., ETH-USDT) is configured.
  • Logic:
    1. The main position (e.g., BTC Long) goes into deep drawdown.
    2. The strategy detects a sentiment shift to Bearish on the higher timeframes.
    3. Bot Action: To protect the account, the bot opens a Short position on the hedge pair.
    4. The size of this hedge is determined by the BEAR_HEDGE_RATIO (e.g., 70% of the main position size).
    5. The profits from the ETH Short help offset the unrealized losses of the BTC Long, stabilizing the margin ratio until the market recovers.

Strategic Mastery & Success Guide

Disclaimer: This software is an automated tool. You are the pilot. The developer guarantees no specific financial outcome. Trade at your own risk.

1. The "Golden" Checklist Before Going Live

Don't turn the bot on and walk away. Follow this pre-flight check:

  • [ ] Trend Check: Is the market trending or ranging? Set TRADE_MODE to auto for most cases, but force long or short if you have strong conviction about the direction.
  • [ ] Capital Safety: Ensure MF_CAPITAL is set correctly. A safe rule of thumb is 50x to 100x your MF_TRADING_LIMIT. (e.g., $10 trade limit requires $500-$1000 allocated margin).
  • [ ] Stop Loss Config: If you sleep, you must defend. Set ENABLE_STOP_LOSS to true with a STOP_LOSS_THRESHOLD of 50% (triggers SL only when 50% of allocated capital is deployed).
  • [ ] Volatility check: In extremely volatile periods (e.g., CPI data release), consider increasing PERIOD_MEDIUM to 360 or 720 to avoid market noise.

2. Risk Management Protocols

GhostRider is aggressive. Tame it with these settings:

  • Conservative:
    • TRADE_MODE: auto
    • ENABLE_WICK_TRADE: false
    • SCALPING_RATIO: 0 (Focus on full closes)
    • DCA_QUOTIENT: 1 (Fewer DCAs)
  • Aggressive (The "Cowboy"):
    • ENABLE_WICK_TRADE: true
    • ENABLE_PARTIAL_SELL: true
    • SCALPING_SELL_AMOUNT: 0.25 (Sell small chunks frequently)
    • DYNAMIC_TRADE_X: true (Let the bot shift zones dynamically)

3. Troubleshooting "Bag Holding"

If the bot enters a trade and price moves against you for days:

  1. Don't Panic Sell: Check the logs to see where the support zones are. Is the price approaching a "Weekly" or "Monthly" support?
  2. Enable "Magic Cooldown": Set MAGIC_COOLDOWN to true. This slows down buying frequency during adverse trends to prevent exhausting your margin too early.
  3. Soft Reduction: Lower your SR (Soft Reduction) parameter. This forces the bot to sell a portion of the bag at break-even or slight loss to free up margin for better entries lower down.

4. Community & Support

Markets evolve, and so does GhostRider.

Ride the wave, but always wear your helmet (Stop-Loss).