Skip to main content

When to Trade Blocks: Controlling When Your Strategy Runs

Control when your strategy runs: per tick, per candle, at a set time, or in sessions. Learn the difference and best use cases.

Updated over 3 months ago

Every trading system in Profectus.AI needs to know when it should check conditions and take action. Thatโ€™s what the When to Trade blocks are for.

These blocks usually sit at the very top of your decision tree. They control how often and under what circumstances everything below them is triggered.


  • A tick is the smallest price movement in the market.

  • There can be many ticks within a single second.

  • This block runs the strategy logic every time a tick arrives.

๐Ÿ‘‰ Use when you want maximum sensitivity, e.g., catching every small change in price, spreads, or fast-moving breakout conditions.


  • A candle is formed on your chosen timeframe (1M, 5M, 1H, 4H, Daily, Monthly, etc.).

  • This block only runs once per candle close.

๐Ÿ‘‰ Example: if set to 1H, the logic runs once at the close of every hourly candle.


Tick vs. Candle Example:

A user asked:

โ€œWhatโ€™s the difference when checking if a Moving Average cross closes above and then entering a long on candle ID 0?โ€

  • Run Per Tick: the system will constantly check the price during the candle. If the cross happens mid-candle, the trade may be entered right away, even if the candle later reverses.

  • Run Per Candle: the system will only confirm once the candle has fully closed. The trade is taken only if the cross is still valid at the close โ€” often resulting in fewer, but more reliable, entries.

๐Ÿ‘‰ The difference: Tick-based entries = faster but noisier. Candle-based entries = slower but more robust.


  • Triggers your logic once per day at a fixed time.

  • Example: โ€œCheck conditions every day at 3:00 AM.โ€

  • Often used for time-based strategies like range breakouts or daily opens.


  • Defines a time window (hours, weekdays, months).

  • Only allows trades to be triggered inside that window.

  • Usually combined with Run Per Candle or Run Per Tick above it.

๐Ÿ‘‰ Example: โ€œRun every 15M candle, but only between 9 AM and 5 PM, Monday to Friday.โ€


  • The simplest control switch.

  • Lets you manually or conditionally turn parts of your strategy on/off.

  • Useful for testing, or for logic that should only run under specific market states.


Best Practices

  • Always place a When to Trade block at the top of your decision tree.

  • Use Run Per Candle for most swing/trend strategies (cleaner signals).

  • Use Run Per Tick for scalping or systems needing intrabar precision.

  • Combine Run In Session with tick/candle logic to restrict trading hours.

  • Keep it simple: more triggers โ‰  better results.

Did this answer your question?