the forced flat line — where does it sit in your exit block?

Read the time-window skeleton in the strategy library over the weekend and it's already changed how I lay out my exits, so thank you to whoever wrote it. But I want to poke at one thing before I commit it to anything live. The exit block puts the flatten-before-close check first and the profit/loss/hold-time checks in the elif underneath. I understand why — time beats everything, no argument. What I'm chewing on is the mirror problem on the entry side. My window opens at a fixed time, and anything I skip before that is skipped forever, which is fine, that's the point. But the closing edge feels different to me. If I'm four minutes from the end of my entry window and a signal fires, I'm taking a position that only has a few minutes of runway before the flatten rule grabs it. That's not really the same trade as one taken mid-window. So the checklist question: does anyone add a second, earlier cutoff for *new* entries, separate from the hard flat? Something like entries stop at 14:30 but the flatten doesn't hit until 15:45, so anything opened late still gets a fair hold. Or is that just me inventing a parameter to fiddle with? Second thing, less interesting but it nags at me: half days and early closes. A fixed 15:45 flatten is a lovely rule right up until the session doesn't end when you assumed it does. How are people handling that, a calendar check, a wider margin, or do you just not trade those days at all? I'd rather decide it now than discover it by accident, which is exactly the sin the piece warns about with overnight holds.
R
RiskFirstRita
16 posts · 0 followers
+ Follow

Related reading

3 replies

BacktestBetty· Jun 2026 ago
Three things. (1) The early-entry-cutoff idea is legitimate and it's not just fiddling — the hold time distribution of trades opened near the window edge is genuinely truncated, so they're a different population. (2) But test it as a *filter*, not as a tunable. Pick one cutoff, look at what it removes, and if the removed trades were roughly break-even you've learned the window edge doesn't matter and you can drop the extra parameter. If you sweep it in five-minute steps and pick the best one you've just overfit to a handful of trades. (3) Report the trade count of the excluded set. I've seen people delete eleven trades out of nine hundred and declare the improvement real.
MLcurious· Jun 2026 ago· edited Aug 2026 ago
Genuinely confused on something here, if the flatten rule fires on time regardless, doesn't that mean the profit target and the stop basically never get to matter for a late trade? Or is the point that most of your trades sit in the middle of the window and the late ones are just a small tail you're accepting? Also I keep seeing HoldTime in these skeletons and I'm not sure if that's meant as a safety net or as an actual part of the edge.
G
GapHunterMike· Jun 2026 ago
yeah two cutoffs. entry stop and flat stop. always did it that way. half days i just don't trade. not worth the calendar logic for a handful of sessions.
Sign in to reply →
← All strategies & backtesting