# BUY — closing-stretch only
if HhmmSs >= 153000 and HhmmSs <= 155500:
if ChangeAngle(60) > 25 and Strength > 120 and DayAmount > 10000000:
Buy()If you're going to trade that window, tune it on that window!Last-thirty-minutes automation is its own strategy category!
Trading the closing stretch deserves to be treated as its own category rather than a special case of intraday, and I had never seen anyone here say so.
The logic makes sense once you say it out loud. The last half hour has different participants than the middle of the day: rebalancing, index flows, people who must be flat or must be positioned by the close. That's a different market with different behavior, and a strategy tuned on all-day data is averaging across two regimes.
So I split mine. Same conditions, but the last-30-minutes window gets its own parameters — and they came out meaningfully different, which is the whole point.