the time window skeleton — how do you pick the times without fooling yourself

So I read the time-windowed skeleton thing in the strategy library over the weekend, the one that's basically "wrap your idea in two clock times and force yourself flat before the close." And my first reaction was mild embarrassment, because the forced flat line is exactly the thing I have never had, and I have the account history to prove it. My best example is a mean reversion idea I ran for about three months that was fine, genuinely fine, right up until it wasn't — I never held overnight *on purpose*, I just didn't have a rule that said get out, so a couple of times a month it held by accident and those accidents ate everything the good days made. So that part I got, loud and clear, and I've already gone back and bolted an exit-by-clock onto the two things I still run. The part I'm less sure about is picking the window in the first place. The write-up says the open is fast and expensive, midday is slow, the last half hour is its own animal — fine, I believe that, it matches what I've felt. But the moment I sat down to actually choose numbers I realised I was going to do the dumb thing: run it at 09:45, run it at 10:00, run it at 10:15, and pick whichever start time made the equity curve prettiest. That's not a window, that's just a parameter I've given a respectable-sounding name. I've done this before with moving average lengths and it did not end well. So the question for people who actually use this shape: do you decide the window from a reason (this idea needs volume, volume shows up after the first move settles, therefore X) and then leave it alone? Or do you test a handful and accept you're fitting a bit as long as the neighbouring values aren't garbage? I'd also like to know what you do about the dead zone — entries stop at say 14:30 but the flatten isn't until 15:45, so there's an hour where you can only be losing or leaking. Do you shrink that gap or is the gap the point? Also, minor thing, but the exit block puts the forced flat first and everything else in the elif. Am I right that the ordering there matters more than it looks?
D
DrawdownDave
11 posts · 0 followers
+ Follow

Related reading

5 replies

R
RiskFirstRita· Jun 2026 ago· edited Aug 2026 ago
The ordering absolutely matters, and I'd go further, write down on paper, in words, what your exit priority is *before* you code it, then check the code matches. My checklist for anything time-boxed is: (1) is there a rule that closes the position with no conditions attached, (2) does it fire early enough that a slow fill still lands inside the session, (3) does it still fire if my entry condition has gone weird or my indicator is stale. On the window itself — pick it from a reason and write the reason in a comment, so future you can't quietly move it 15 minutes to make a bad week look better.
N
NightOwl_Yuki· Jun 2026 ago· edited Aug 2026 ago
haha the dead zone question doesn't really translate to my side, crypto just keeps going and I'm usually on around when you lot are asleep, but I still use windows, just anchored to when the US and Asia sessions overlap because that's when my stuff behaves. Same idea, different clock. And yeah I picked mine from watching, not from optimising, which is probably the only reason I trust it.
L
LurkerLee· Jun 2026 ago· edited Aug 2026 ago
genuine question, those accidental overnight holds that ate the month, were they bad because of the gap, or were they already losers at 3pm and you just refused to close them? because if it's the second one the clock rule is fixing a symptom.
CryptoKarl· Jun 2026 ago
the dead zone thing is the bit I'd actually think about. no new entries but still holding = you're paying the risk without the edge. on my side I anchor to funding rather than clock times and the same problem shows up, you sit through a payment you didn't need. my honest fix was just make the flatten earlier, not the entries later. also lol at "that's not a window, that's a parameter I gave a respectable name", stealing that
BacktestBetty· Jun 2026 ago· edited Aug 2026 ago
Order of operations that's worked for me, for what it's worth: 1. Pick the window from a sentence first, like you said. Write it out: "this needs the first move to resolve so I want the 30 min after that." If you can't write the sentence, you don't have a reason, you have a search. 2. Then test the neighbours anyway, but not to pick the best one. You're checking the shape. If 09:45 is great and 10:00 and 09:30 are both awful, you found noise. If the whole 09:45–10:30 region is mildly ok, you can pick the middle of it and be honest that you picked the middle. Plateau, not peak. 3. Decide the number of variants you'll look at before you look, and count them. Four start times × two flatten times is eight, and eight is enough to find a pretty curve in random data. 4. Dead zone: I'd treat entry cutoff and flatten as two separate decisions with two separate reasons. Mine usually ends up narrow because I can never justify the hour, but if your idea genuinely needs time to work then the gap *is* the point and you should be able to say roughly how long the average winner takes to get there. If you don't know that number, measure it — it basically hands you the entry cutoff. Also re: your last line getting cut off, I think you were about to ask about the ordering in the exit block, and Rita covered it, but I'd add, test the case where two exits want to fire on the same bar. That's where the ordering actually shows up and it's rarely in the sample data.
Sign in to reply →
← All strategies & backtesting