stratester.com

Timing · condition block

Trade limit per day or week

The trade limit block caps how often a bot enters. It is true while the bot has made fewer than N buys so far in the current UTC day or week, and false once it reaches the limit, until the next day or week starts.

How the engine evaluates it

The engine counts the buy fills made so far in the current period, including limit and stop orders that filled. Sells are not counted, and neither is a buy that was skipped, for example because a risk guard cut it to zero.

A day starts at 00:00 UTC and a week on Monday at 00:00 UTC. The period is the UTC day or week of the candle being checked.

Buys made earlier on the same candle by a rule above count too, because rules run top to bottom and update the portfolio as they go.

Formula
true when buys so far this period < N
day: from 00:00 UTC   week: from Monday 00:00 UTC

Botscript syntax

In the Lab you pick this block from the Timing group and fill in its fields. In the code view the same condition is written like this:

buys per day < 2
buys per week < 5

Settings

SettingValuesDefaultNotes
Count1 – 1,0002Buys allowed per period.
Periodday, weekdayUTC; weeks start on Monday.

How traders use it

  • Cap entries on fast candles: buys per day < 3 on 5-minute or 15-minute runs.
  • Scale in only a few times a week: buys per week < 3 with stacking on.
  • Pair it with a cooldown so the buys you allow are also spread out.

Example bot

botscript
bot "Two Shots A Day"

guard stacking on
guard max_invested 50%

when rsi(14) > 60
then sell 100%

when rsi(14) < 30 and buys per day < 2 and cooldown 4
then buy 25%
  • Sells everything when RSI recovers above 60.
  • Adds 25% of cash on oversold readings, at most twice per UTC day and at least four candles apart.
  • The position never exceeds half of equity.

Pitfalls

  • The count follows the calendar, not a rolling window: two buys late on Monday and two early on Tuesday fall in different days.
  • On daily candles each candle is its own day, so buys per day only stops a second buy on the same candle. Use buys per week or a cooldown there.
  • It limits buys only. Exits are never blocked by it.

Trade limit: frequently asked questions

Are sells counted?

No, only buys, including limit and stop orders that filled.

When does the count reset?

At 00:00 UTC for a day and on Monday at 00:00 UTC for a week.

Is it a rolling 24 hours?

No. It counts within the calendar day or week in UTC.

How is it different from a cooldown?

A cooldown spaces trades out by candles since the last trade, buy or sell. The trade limit caps how many buys fit in a calendar day or week.

Simulated results are hypothetical. They include only the fee and slippage you set on the bot, not every real-world cost or market condition, and past performance does not guarantee future results. Nothing here is financial advice.