Every other block in this library reads one clock. This multi timeframe strategy reads three in the
same condition: the day so far, the last twenty minutes, and the current second. The suffix on the factor name is what
picks the clock.
1. The rule
# BUY
if ChangePct_1d > 3 and TradeAmount_1d > AvgTradeAmount_1d(20, 1) * 2:
if Price > Sma_1m(20) and Strength > AvgStrength(300) * 1.2:
Buy()# SELL
if ProfitPct >= 2.0 or ProfitPct <= -1.0 or HoldTime >= 1800:
Sell()
2. One name, three clocks
Written as
Reads
Arguments are counted in
Strength
the current second
seconds
Sma_1m(20)
the last 20 minute bars
minutes
ChangePct_1d
the daily bar
days
The same base name takes a suffix and the window arguments change unit with it. AvgStrength(300)
is five minutes of seconds; Sma_1m(20) is twenty minutes; AvgTradeAmount_1d(20, 1) is twenty
days.
That is the whole mechanism, and it is why a daily filter does not need a separate strategy. The
outer condition asks whether today is worth trading at all. The inner condition asks whether this
second is the moment.
3. The trap in the daily suffix
A bare _1d name is today's bar, still forming. ChangePct_1d at eleven in the morning is the
move so far today, not yesterday's close-to-close.
That is usually what you want in the outer filter, and it is a disaster if you use it where you meant
history. To reach completed days you give the window a second argument, which offsets the end of the
window backwards: AvgTradeAmount_1d(20, 1) is twenty days ending one day ago, so today is excluded.
Writing it as AvgTradeAmount_1d(20) would include the day you are standing in, and the comparison
TradeAmount_1d > AvgTradeAmount_1d(20) * 2 would be partly comparing today against itself. The
offset is not decoration.
4. What the round trip asks of it
Daily context with a one-second entry: the exit block drawn to scale, and the break-even win rate before and after measured trading costs
A 2.0% target against a 1.0% stop needs 33% on paper and 58% after the measured median round
trip. The wider target is doing the work here: the same cost against a 1% target would need two
thirds of your trades to win.
That is the main argument for putting a daily filter in front of a fast entry. It is not that the
daily bar predicts anything on its own. It is that restricting the day lets you hold for a larger
target without the sample collapsing, and a larger target is what the round trip can live with.
5. What to change first
Change ChangePct_1d > 3 and watch the trade count, not the result. This single number decides how
many days survive, and most of the behaviour of the block follows from it.
Then try moving the inner trigger to the minute frame entirely, Price > Sma_1m(20) on its own
without the second-level Strength term, and see whether the second-level condition was adding
anything. Running a block at one-second resolution has a cost in fills that a minute-level version
does not pay (why your backtest does not match live trading).
Educational template for research and backtesting. Not investment advice and not a signal service.
Originally published by TraderWe on October 4, 2026. You may quote and link to this page. Republishing the full text without a link back to the original is not permitted.