STRATEGY LIBRARY

Overnight crypto trading strategy: three ways out while you sleep

Contents
An overnight crypto trading strategy for anything that runs while you are not there. Three defensive properties, stated as code rather than as intentions.

1. The rule

# BUY — conservative gate if DayAmount > 30000000 and Strength > 110: if ChangeAngle(120) > 10: Buy()# SELL — three independent ways out if ProfitPct >= 2.0: Sell() elif ProfitPct <= -1.5: Sell() elif HoldTime >= 2400: Sell()

2. Why three separate branches

The exits are written as separate branches rather than one combined condition on purpose. Each way out should be independently obvious when you read it at three in the morning. Clarity is a safety feature, not a style preference.
BranchEnds the trade whenWhat it protects against
ProfitPct >= 2.0the target is hitgiving a winner back while you sleep
ProfitPct <= -1.5the stop is hita move continuing against you
HoldTime >= 240040 minutes have passedthe trade that neither wins nor loses
The third one is the branch that matters most unattended, and it is the one people omit. Crypto has no closing bell. Nothing else in your setup will ever end that position.

3. The angle is degrees, not percent

ChangeAngle(120) > 10 asks for a slope, and the slope required scales with the window. A threshold of 30 that fires all day on a one-minute window barely fires at all on a ten-minute one. It is worth stating plainly because the failure is silent: the strategy simply takes no trades, and you spend a morning wondering why the overnight version did nothing.

4. What the round trip asks of it

Overnight crypto strategy: the exit block drawn to scale, and the break-even win rate before and after measured trading costs
Overnight crypto strategy: the exit block drawn to scale, and the break-even win rate before and after measured trading costs
At a measured round trip of about 0.10% on liquid pairs, the 2.0% / 1.5% structure moves from a 43% break-even to 46%. Execution is not what will hurt you here. What will hurt you is the gap between the book you backtested and the book that exists at 04:00. Depth thins out overnight, and a strategy sized against daytime depth can find itself walking several levels for a fill — see the real cost of crypto trading for measured depth by venue and clip size.

5. What to change first

Shorten the time exit before you touch anything else. Forty minutes is already conservative; the question worth asking is whether you would be comfortable holding this position for that long without looking, because that is exactly what you are agreeing to. Then check your connection actually survives the night. A strategy with three exits and a dropped websocket has zero exits — see where should your trading bot run? cloud, your own VPS, or your PC. Backtest first: how to backtest a crypto trading strategy.

Educational template for research and backtesting. Not investment advice and not a signal service.

Related reading

← All strategy library

Originally published by TraderWe on May 23, 2026. You may quote and link to this page. Republishing the full text without a link back to the original is not permitted.

9 replies

CryptoKarl· May 2026 ago
"Clarity is a safety feature" — writing that on the wall.
R
RiskFirstRita· May 2026 ago
Separate branches also make it obvious when you've forgotten one. Combined conditions hide gaps.
ZenTrader_Ana· Jun 2026 ago· edited Aug 2026 ago
The 3am clarity point is the part I keep coming back to. Half of my worst manual overrides happened because I opened a rule I'd written and needed twenty seconds to parse it, and in those twenty seconds I'd already decided emotionally. How do you all handle the urge to intervene when something is running unattended?
GrandpaGrizzly· Jun 2026 ago· edited Aug 2026 ago
Seen plenty of folks write one big clever condition, then spend a month wondering why it never fired. Separate branches would've told them in an afternoon.
G
GapHunterMike· Jun 2026 ago
the time exit is the one people skip. profit and stop feel like real exits, a clock feels arbitrary. it isn't. flat position while you sleep beats a clever one.
C
CoffeeAndCharts· Jul 2026 ago
Love that the angle-vs-window bit is spelled out, that's the kind of thing that quietly eats people. Adding this to the folder I read on Sunday mornings with coffee.
H
HalfKelly· Jul 2026 ago
One thing worth noting for anyone borrowing this: the -1.5 branch is what turns your position size into an actual number. Whatever fraction of the account you're willing to lose on one bad night, divide it by 1.5% and that's your ceiling per entry. If you widen that stop later, the size has to come down proportionally or you've quietly doubled your risk without touching the sizing line.
N
NightOwl_Yuki· Jul 2026 ago
Ana — honestly I mostly handle it by being asleep, which is the cheapest discipline there is. And yeah HalfKelly, the stop and the size are one decision, I should probably have said that in the post. Rita's point about forgotten branches is the real reason I write them out flat, I've shipped a combined condition before with no time exit in it and only noticed days later.
L
LurkerLee· Jul 2026 ago
does the 2400s clock start from entry fill or from when the condition first triggered? asking because on my end those drifted apart more than i expected
Sign in to reply →