[TOC]

This strategy was open-sourced by user @Gianbin, adapted from our earlier dual-route workflow trading framework. Thanks for the generous contribution — here’s a full breakdown of the strategy logic.
In crypto, “pump coins” appear frequently — tokens that surge 30–40% or even 100%+ in a single day. They look tempting, but the harder they pump, the harder they tend to dump.
This strategy exploits exactly that:
Capital management principle: Fixed 50 USDT per entry, total position capped at 500 USDT — relatively controlled risk.
The strategy consists of two independent workflows, each with its own role:
Strategy decisions can run at a relaxed pace, but risk control must react fast. That’s why the trigger frequencies differ so dramatically.

A timer trigger fires every 15 minutes, pulling all USDT perpetual contract tickers from Binance. It filters for tokens with 24-hour gains exceeding 10% and takes the top 20. Tokens already in open positions are automatically excluded to prevent duplicate entries.
// Core screening logic (excerpt)
const minChange = $vars.minChange || 0.1; // Default gain threshold: 10%
const topN = $vars.topN; // Top N, default 20
// Filter USDT perpetuals, calculate 24h change
const change24h = open24h > 0 ? (price - open24h) / open24h : 0;
if (change24h < minChange) continue; // Below threshold, skip
// Exclude tokens already in positions
if (excludeHolding && holdingSymbols.indexOf(symbol) !== -1) continue;
// Sort by gain descending, take top N
usdtPairs.sort((a, b) => b.change24h - a.change24h);
const topGainers = usdtPairs.slice(0, topN);
This step is essentially an “audition” — rounding up the hottest pump coins for further analysis.
Price gains alone aren’t enough. The system simultaneously collects the following data to feed the AI analysis:
| Data Dimension | Meaning | Purpose |
|---|---|---|
| Open Interest (OI) | Total contract market open positions | Measure liquidity and market hype |
| Funding Rate | Payment ratio between longs and shorts | Determine if shorts are already overcrowded |
| Market Cap (MCap) | Circulating market cap | Calculate OI/MCap leverage ratio |
| K-line Data | Daily OHLCV | Technical pattern analysis |
The OI/MCap ratio is the core metric — the higher this ratio, the more leveraged the market is, the greater the liquidation risk, and the better the odds for shorting.
// Fetching open interest via Binance API (excerpt)
const ret = exchange.IO("api", "GET", "/fapi/v1/openInterest", "symbol=" + symbol);
if (ret && ret.openInterest) {
openInterest = parseFloat(ret.openInterest) * coin.price; // Convert to USD
}
// Calculate OI/MCap ratio
const oiMcapRatio = marketCap > 0 ? openInterest / marketCap : 0;
Market cap data is fetched from the CoinMarketCap API with a 30-minute local cache to avoid excessive external API calls.
This is the heart of the strategy. After collecting data, everything is packaged and sent to an AI model (x-ai/grok-4.1-fast in this case) for scoring on a scale of 10. Only targets scoring 8.0 or above make it to the candidate entry list.
| Factor | Weight | Scoring Logic |
|---|---|---|
| OI/MCap Ratio | 3.5 | >35% = full score; higher leverage = more dangerous |
| K-line Pattern | 2.8 | Long upper shadows / high doji = topping signals score high |
| Open Interest | 1.5 | Better liquidity = higher score |
| Volume | 1.5 | More active trading = higher score |
| Price Gain | 0.5 | Already filtered initially, low differentiation |
| Funding Rate | 0.2 | More crowded longs = higher score |
OI/MCap ratio carries the highest weight (3.5) because it directly reflects market leverage — higher leverage means a reversal is more likely to trigger cascading liquidations, giving shorts better risk-reward.
Before AI scoring, the strategy applies several hard filters — failing any one means the token is skipped entirely:
// Weekly high calculation (excerpt)
const weeklyHigh = Math.max(...klines.slice(-7).map(k => k.high));
const weeklyDrawdown = (weeklyHigh - price) / weeklyHigh;
if (weeklyDrawdown > 0.05) { // More than 5% from weekly high, skip
filtered.weeklyDrawdown++;
continue;
}
When total score ≥ 8.0 and intraday drawdown ≤ 5%, the decision logic kicks in: if funding rate ≥ -0.15%, output “open short”; if funding rate is between -0.20% and -0.15%, output “cautious short.” Targets scoring below 8.0 are not outputted and no positions are opened.
The AI outputs decisions in JSON format, and the trade execution node parses and places orders:
// Execute short (excerpt)
function executeShort(coin, signalInfo) {
exchange.SetCurrency(coin + '_USDT');
exchange.SetContractType("swap");
exchange.SetMarginLevel(CONFIG.DEFAULT_LEVERAGE); // Set required leverage
// Calculate contract size from fixed amount
const contractAmount = calculateContractAmount(
CONFIG.FIXED_AMOUNT_USD, // Fixed 50U
currentPrice,
market
);
exchange.SetDirection("sell");
const orderId = exchange.Sell(-1, contractAmount); // Market short
if (orderId) {
_G(`${coin}_USDT.swap_maxprofit`, 0); // Initialize max profit tracker
Log(`✅ ${coin}: Short opened, score ${signalInfo.score}`);
}
}
Each entry uses a fixed 50 USDT — single-trade risk is well-contained.
Triggers every 5 seconds, continuously monitoring all open positions with two core functions: inverse pyramid scaling and take-profit / stop-loss.
This is the most interesting design in the strategy. After opening a short, if the price rises instead of falling, most traders would stop out. But this strategy chooses to scale in against the trend — the higher it goes, the more it adds — because the higher the pump, the harder the eventual crash tends to be.
Scaling rules:
// Pyramid add detection (excerpt)
function checkAndExecutePyramidAdd(coin, entryPrice, currentPrice, isShort) {
const addCount = _G(addCountKey) || 0;
if (addCount >= 2) return null; // Max 2 additions
if (addCount === 0) {
// First add: triggered at 50% above entry
triggerPrice = storedEntryPrice * (1 + PYRAMID_CONFIG.ADD1_TRIGGER);
addAmount = PYRAMID_CONFIG.ADD1_AMOUNT; // 150U
} else if (addCount === 1) {
// Second add: triggered at 70% above first add price
triggerPrice = add1Price * (1 + PYRAMID_CONFIG.ADD2_TRIGGER);
addAmount = PYRAMID_CONFIG.ADD2_AMOUNT; // 300U
}
if (currentPrice >= triggerPrice) {
return {
level: addCount + 1,
amount: addAmount,
triggerPrice,
currentPrice
};
}
return null;
}
The logic behind this design: The more a pump coin surges, the more frenzied the speculation, and the bigger the bubble. When the reversal finally hits, high leverage triggers cascading liquidations that amplify the crash. Holding a larger position at higher prices means profits multiply when the reversal comes.
The risk is equally obvious: If the token genuinely keeps rising without looking back (e.g., a real bull market or major fundamental catalyst), losses scale up too. Therefore, the account should hold sufficient funds to withstand volatility and avoid forced liquidation. The strategy explicitly caps total position at 500U to prevent unlimited scaling.
Take-profit uses a trailing drawdown model rather than a fixed target:
This design “lets profits run” — it won’t exit too early and miss bigger gains, but also won’t ride the elevator back down and give it all back.
// Auto take-profit trigger logic (excerpt)
if (enableAutoTpDrawdown && isShort && tpDrawdown === 0
&& maxPnlPercent >= autoTpTrigger) {
tpDrawdown = autoTpDrawdownValue; // Set 5% trailing TP
_G(tpDrawdownKey, tpDrawdown);
Log(`🎯 ${coin} max P&L reached ${maxPnlPercent}%, enabling 5% trailing TP`);
}
// Trigger take-profit
if (tpDrawdown > 0 && maxPnlPercent > 0 && drawdown >= tpDrawdown) {
autoCloseReason = `Trailing TP (drawdown ${drawdown}% ≥ ${tpDrawdown}%)`;
}
For stop-loss, the strategy supports manually setting a fixed percentage stop-loss as a hard floor of protection.
The strategy includes four built-in monitoring panels for real-time operational awareness:

Refreshes every 5 seconds, rendered as interactive tables via FMZ’s LogStatus, supporting direct actions like closing positions and modifying TP/SL parameters.
The core philosophy of this strategy: replace subjective judgment with data and AI, replace wishful thinking with strict position control.
Whether it’s the design of the six-factor scoring system or the choice of OI/MCap ratio as the core metric, you can see the author has a solid understanding of market microstructure — knowing which indicators truly matter and which are just noise.
That said, every strategy has its boundaries. Tools are static; markets are dynamic. We strongly recommend thorough backtesting before going live, adjusting parameters to your own risk tolerance, and never copying blindly.
Special thanks to user @Gianbin for sharing this strategy so openly. It’s this kind of open-source spirit that gives more people the opportunity to learn and explore the possibilities of quantitative trading. If you have great strategy ideas of your own, we’d love to hear about them!