[TOC]

If you ask a quantitative trader what their biggest headache is, besides “how to find good entry signals,” it’s “where exactly should I set my stop-loss?”
Stop-loss is one of those things where acting too early leads to regret, and acting too late leads to even more regret. You watch a coin reach 1.4% profit, feeling good and thinking “just wait a bit longer, it’ll definitely hit my 2% take-profit target,” and then it slides down like it’s on a playground slide, all the way to -0.1% where your stop-loss kicks in.
What’s even more painful is that this isn’t a one-time occurrence—it’s a daily drama. Your equity curve swings wildly up and down, like watching a thriller movie without a script.
This article will share the various stop-loss methods we’ve tried, based on a real AI-enhanced rotation strategy. We hope to provide some inspiration for fellow traders struggling in the stop-loss abyss.
Let me briefly introduce our strategy framework:

This strategy can indeed identify some promising coins and achieve good returns by following trends. However, crypto volatility is simply too extreme, often experiencing significant profit drawdowns or even reversals into losses. The stop-loss problem has been plaguing us. Thus began our long journey of exploring stop-loss solutions.

The trailing stop is the most classic stop-loss approach. The core logic is simple:
Track the highest profit point since opening the position, and trigger a stop when the price retraces beyond a set percentage from that peak.
The philosophy behind this method is: “I don’t know how high the price can go, but I know when it starts falling, it’s time to exit.”
// Core logic
const currentPnl = (currentPrice - entryPrice) / entryPrice; // Current P&L
const drawdown = maxProfit - currentPnl; // Drawdown amount
// Update maximum profit
if (currentPnl > maxProfit) {
maxProfit = currentPnl;
_G(symbolKey, maxProfit); // FMZ persistent storage function
}
// Trigger stop-loss
if (drawdown >= TRAILING_STOP_PERCENT) {
closePosition(coin, "Trailing Stop");
}
Pros: - Locks in partial profits, prevents “riding the elevator back down” - Excellent performance in trending markets, lets profits run - Simple logic, less prone to bugs
Cons: - Easily “shaken out” in ranging markets - Setting the drawdown threshold is more art than science - Treats all profit levels equally, lacks granularity

Since trailing stops are too “one-size-fits-all,” let’s set different strategies for different profit levels.
It’s like playing a video game—you can take risks in the beginner village, but when you’re max level with full gear, you should be more careful.
Our tiered design:
| Profit Range | Stop Level | Mode |
|---|---|---|
| < 0% | -1% | Protective Stop |
| 0% ~ 0.5% | 0% | Break-even Stop |
| 0.5% ~ 1% | +0.5% | Profit Lock |
| 1% ~ 1.5% | +1% | Profit Lock |
| 1.5% ~ 2% | +1.5% | Profit Lock |
| ≥ 2% | Peak - 1.5% | Trailing Stop |
const STOP_LOSS_TIERS = [
{ minProfit: -Infinity, maxProfit: 0.0001, stopAt: -0.01 },
{ minProfit: 0.0001, maxProfit: 0.005, stopAt: 0 },
{ minProfit: 0.005, maxProfit: 0.01, stopAt: 0.005 },
// ... more tiers
{ minProfit: 0.02, maxProfit: Infinity, trailing: 0.015 }
];
// Find corresponding tier based on max profit and return stop level
function calculateStopLevel(maxProfit) {
for (let tier of STOP_LOSS_TIERS) {
if (maxProfit >= tier.minProfit && maxProfit < tier.maxProfit) {
return tier.trailing ? maxProfit - tier.trailing : tier.stopAt;
}
}
}
Pros: - More refined, different protection for different profit levels - Protective stop when not in profit, avoids big losses - Gradually locks in profits, psychologically comfortable
Cons: - Essentially an “over-defensive” version of trailing stop - Overly rigorous tier design makes stops trigger more easily - Often results in: stopping out when you should, but missing profits you should have kept

Since this is a trend-following strategy, let’s simplify: let profits run, only do stop-losses. Sometimes, simple and straightforward is a virtue.
I only control losses; as for how much profit to take, I leave that to the AI signal to decide when to close.
Suitable for scenarios where you trust the entry signal and only need to control maximum loss.
// Simple to the point of being embarrassing
if (currentPnl <= -FIXED_LOSS_PERCENT) {
closePosition(coin, "Fixed Stop-Loss");
}
Pros: - Extremely simple logic, very low chance of errors - Maximum loss is clear and controllable - Won’t exit too early due to improper take-profit settings
Cons: - No take-profit mechanism, profits may give back significantly - Completely relies on other signals to decide profit-taking

The results weren’t ideal—often couldn’t capture profits. Since stop-loss only is too extreme, let’s manage both ends:
Set both a profit target and a loss limit simultaneously. I know how much I want, and I know how much I can afford to lose.
Sounds very rational, like what a mature trader should do.
// Take-profit check
if (currentPnl >= FIXED_PROFIT_PERCENT) {
closePosition(coin, "Fixed Take-Profit");
}
// Stop-loss check
if (currentPnl <= -FIXED_STOPLOSS_PERCENT) {
closePosition(coin, "Fixed Stop-Loss");
}
Pros: - Clear risk-reward ratio, easy to analyze statistically - Both take-profit and stop-loss have clear standards - Suitable for strategies with clear expectations
Cons: - Take-profit target set too high may never be reached - Take-profit target set too low may miss big moves - Parameters need adjustment based on coin volatility

Results still weren’t ideal. With the take-profit ceiling plus unstable entry signals, the final risk-reward ratio was still negative. Since single-coin profits are hard to control stably, let’s change our thinking and aggregate statistics across multiple coins.
Dynamically calculate take-profit and stop-loss amounts based on position count. Don’t care about individual soldier performance, as long as the team profits overall.
For example: 100U per position, 3 positions, take-profit coefficient 0.1, then take-profit target = 3 × 100 × 0.1 = 30U; stop-loss target = 3 × 100 × -0.05 = -15U.
// Calculate dynamic take-profit and stop-loss amounts
const profitTarget = positionCount * AMOUNT_PER_POSITION * PROFIT_RATIO;
const lossLimit = positionCount * AMOUNT_PER_POSITION * LOSS_RATIO;
// Check overall P&L
if (totalProfit >= profitTarget) {
closeAllPositions("Take-Profit");
}
if (totalProfit <= -lossLimit) {
closeAllPositions("Stop-Loss");
}
Pros: - Manages risk from an overall perspective - Take-profit and stop-loss amounts adjust dynamically with positions - Suitable for diversified investment strategies
Cons: - One coin’s big loss may drag the whole portfolio into stop-loss - Good positions may get “cut across the board” - Not suitable for single-coin or volatile position count situations

After trying various stop-loss methods, you sometimes fall into a philosophical dilemma:
Maybe the problem isn’t that the stop-loss method is wrong, but that I shouldn’t be auto-stopping at all?
Zen Mode: Completely trust the AI’s entry and exit signals, set no automatic stop-loss.
Applicable scenarios: - AI signals are very reliable and can timely identify trend reversals - Market volatility is extreme, traditional stop-losses cause more losses - Testing “pure signal” effectiveness, eliminating stop-loss interference
if (STOP_MODE === "ZEN") {
// Do nothing, leave everything to AI signals
return { status: "Zen Mode", message: "No automatic closing" };
}
Although Zen Mode sounds very Buddhist, it requires a strong signal system and psychological resilience. Ordinary people please use with caution, otherwise your funds might reach “enlightenment” before you do.
Everything introduced above are overall stop-loss strategy frameworks. But when actually executing stop-losses, you can design with more granularity.
For example, Anti-Wick Stop-Loss:

Crypto has a famous phenomenon called “wicks”—prices spike dramatically and then quickly recover, specifically harvesting people who set stop-losses.
A countermeasure: Don’t stop immediately, but count how many times the stop-loss line is touched within a period. Only actually stop after reaching a threshold.
The logic is: if it’s just a wick, the price will quickly recover; if it’s a real trend reversal, it will continuously touch the stop-loss line.
// Core logic
let triggerCount = 0;
const THRESHOLD = 3; // Need to touch 3 times to actually stop
// Each check
if (currentPnl <= STOP_LOSS_PERCENT) {
triggerCount++;
if (triggerCount >= THRESHOLD) {
closePosition(coin, "Anti-Wick Stop-Loss");
triggerCount = 0;
}
} else {
triggerCount = 0; // Price recovered, reset count
}
Of course, this also has risks: when the market really crashes, you might suffer bigger losses while “waiting for confirmation.” So it’s more suitable for market environments where wicks occur frequently.
There are many similar fine-grained designs, and the core idea is: within the overall strategy framework, make targeted optimizations for specific scenarios.

After actual testing of the above methods, we reached a somewhat “counter-intuitive” conclusion:
The simplest trailing stop actually had the best overall performance in this strategy.
Why?
Because this strategy’s original intent is to select coins with extreme potential, where individual coin explosions can cover losses from other coins. Therefore, the more flexible trailing stop can better capture trends.
But this doesn’t mean trailing stops are universal solutions for all strategies. Our conclusion is:
Honestly, we haven’t completely solved the stop-loss problem either; we’ve just found a relatively acceptable solution for the current stage.
Here are a few directions we think are worth continuing to explore:
Dynamic parameters based on volatility. Current stop-loss parameters are fixed, but different coins and different market phases have vastly different volatility. If we could automatically adjust stop-loss ranges based on recent ATR, theoretically it should better adapt to the market. Of course, there’s often a Pacific Ocean between “theoretically” and “actually.”
Different strategies for different coins. BTC and altcoins have completely different characteristics; using the same stop-loss logic for both is somewhat crude. Perhaps we could automatically match the most suitable stop-loss method based on a coin’s historical volatility characteristics.
Incorporate holding time into consideration. Set tighter stop-loss protection when just opening a position to protect capital; the longer you hold, the more stable the trend, so appropriately loosening the stop gives it more room. This logic sounds reasonable, but how exactly to design the time decay function still needs exploration.
Combine more signal sources. Current stop-loss purely looks at price, but if we could combine volume anomalies, funding rate changes, or even news sentiment signals, perhaps we could more accurately judge whether it’s a “normal pullback” or “trend reversal.” Of course, the more signal sources, the more complex the system, and the higher the probability of problems.
These ideas are all still at the “idea” stage. Once we actually implement them and get results, we’ll share with everyone.
After reading this far, you might ask: which stop-loss should I actually use?
My answer is: try them all.
Every strategy has its own “personality,” and every market has its own “temperament.” You need to find the rapport between your strategy and the market. Stop-loss methods are just tools, and the prerequisite for using tools well is understanding them.
If you have better stop-loss ideas, feel free to discuss—after all, on the path of quantitative trading, we’re all travelers learning from our mistakes as we grow.
One final quote:
Stop-loss is not admitting defeat, but preparing for a better strike next time.
Happy trading! 🚀