Skip to main content

XGrid Strategy

What It Does

XGrid is a high-frequency momentum grid scalper: it detects short-term trend direction with technical signals, places a tight grid of orders in that direction, and takes profits within seconds-to-minutes rather than hours.
Naming, to avoid confusion: in the Marketplace tab, the “XGrid” family label covers the high-frequency Perp Market Maker presets (MM Professional, v7/v8 Counterscalp, HFT v6, …) — the two-sided grid scalper documented in the Perp Market Maker guide. This page covers the XGrid trend signal engine that powers those presets’ counter-scalp features, plus the standalone XGrid strategy. If you came here from a Marketplace card, start with the Perp MM guide and come back here for the signal details.

The XGrid Trend Signal

The signal engine answers one question every 30 seconds: is short-term momentum long, short, or unclear? It returns LONG, SHORT, or neutral, and is consumed by the Perp MM’s counter-scalp and entry logic.

How a signal is built

Signal parameters (actual engine defaults)

string
default:"1m"
Candle timeframe the signal runs on. The engine is designed for 1-minute momentum.
integer
default:"15"
Donchian channel lookback (candles) for the breakout confirmation.
float
default:"0.30"
How close to the channel boundary (in %) price must be to count as a breakout.
integer
default:"60"
Lookback for the Normalized ATR volatility baseline.
float
default:"1.1"
Current volatility must exceed natr_mult × its baseline for a signal to fire.
float
default:"0.02"
Absolute NATR floor (%). Below this the market is too quiet to scalp regardless of relative volatility.
float
default:"30"
Signals are cached for 30 seconds to limit API load; the engine re-evaluates when the cache expires.
The EMA pair (11/23) is fixed in the engine — the fast EMA reacts to the last ~10 minutes, the slow one filters noise, and their cross defines the bias.

Standalone XGrid Strategy

The standalone XGrid strategy (selectable as strategy: "xgrid") is a faster, tighter sibling of Vortex DCA:
  • 2-second take-profit refresh (vs 60s for Vortex) — exits are managed near-continuously
  • 2-minute default grid refresh (vs 3 minutes for Vortex)
  • Exponential level spacing: levels start at a configurable first_level_distance from price and spread out with a power curve toward outer_distance, packing more orders close to the action
  • Startup cleanup: cancels existing orders on boot so stale orders from a previous run can’t interfere
  • Shares Vortex’s virtual-chunking position recovery (3% threshold, 5 chunks, 0.1% per-chunk target by default)
It uses the same core parameters as Vortex (nr_clusters, outer_distance, wallet_exposure, minimum_tp) with tighter values. Current Marketplace presets deploy the perp_mm implementation instead, which layers full two-sided quoting and risk tiers on top of the same high-frequency idea.

How the Signal Drives Perp MM

XGrid Counter Scalp

When the Perp MM’s main position is underwater and the XGrid signal points the other way, the bot opens a counter-position to scalp the move against you:
Key behavioral guards:
boolean
default:"false"
Enable counter-trend scalping. On in the v7/v8 Counterscalp and HFT v6 presets.
integer
default:"50"
Counter position cap as % of the main position.
boolean
default:"true"
The signal must cycle through neutral before re-entry (prevents whipsaw churn on a noisy signal).
integer
default:"300"
The main position must be at least this old before counter-scalping starts.

Godmode Scalp

A stricter variant that only fires when multiple confirmations align: main position underwater past a threshold, XGrid confirming the opposite trend, and a whale wall present on the counter side. Fewer entries, higher conviction.

When the Signal Works Well (and When It Doesn’t)

Prefer liquid symbols (majors, high-volume alts). On illiquid pairs, the 1-minute candles are too noisy for the breakout logic.
Counter-scalping trades against your own underwater position. It can offset losses in a continued trend, but if the market V-reverses, the counter position loses while the main recovers. The caps above (max_counter_pct, signal-cycle requirement) bound that risk — they don’t remove it.

Troubleshooting

”No signals generated”

  1. Volatility below min_natr_abs or below natr_mult × baseline — the market is too quiet, which is intended behavior
  2. EMA11 ≈ EMA23 (no clear bias) — check the log’s rejection reason
  3. Signal cached — changes only propagate after the 30s cache expires

”Too many false signals”

Whipsaw conditions. The signal-cycle requirement (require_signal_cycle) is the main defense; verify it’s enabled before tuning anything else.

Next Steps

Perp Market Maker

The strategy these signals power (Marketplace “XGrid” family)

Preset Guide

Which counterscalp preset to pick