Risk Management for No‑Code Trading Bots: Position Sizing, Max Loss Limits & Kill Switches

Expert guides, insights and articles updated for 2026

Published 2 hours ago

These controls are what stop a no-code trading bot from “working fine for weeks” and then wiping out months (or years) of progress in one ugly session. Your edge matters—but in automation, your guardrails matter more, because the bot will repeat the same mistake 50 times without hesitation.

Below is a practical, platform-agnostic risk “operating system” you can build in most no-code bot tools using simple rules, counters, and toggles.


What can go wrong with automated trading (and why a ‘good strategy’ isn’t enough)

Automation scales mistakes faster than profits

A manual trader might pause after two losses. A bot won’t—unless you tell it to. Most blow-ups aren’t one bad trade; they’re a bad action repeated over and over:

  • Re-entering on the same signal (duplicate webhook, same candle, retrigger loop)
  • Trading through spread spikes and poor fills
  • Stacking correlated positions (hidden leverage)
  • Continuing through a losing streak because “it should revert”

The hidden risks: leverage, correlation, execution, and regime shifts

Even a conservative bot can become aggressive when conditions change:

  • Leverage & margin: small moves turn into liquidations if sizing drifts up.
  • Correlation: five “different” FX pairs can still be the same USD bet.
  • Execution: spreads widen, slippage increases, partial fills happen.
  • Regime shifts: calm markets flip into news volatility, gaps, or thin liquidity.

Goal: a simple risk ‘operating system’

You’re building a system that:

  • Limits losses by design
  • Fails closed (when in doubt, don’t trade)
  • Survives long enough for your strategy to prove itself

The risk stack: controls you should have at 3 levels

Think of bot risk management as a stack. If one layer fails, another catches it.

Level Goal Examples
Trade-level Keep each trade survivable position sizing, required stop-loss, max spread, max slippage
Day/week level Stop streaks and “bad days” max daily loss, weekly drawdown cap, max trades/day, cooldowns
System-level Handle unknown/unsafe states kill switch, data/connector fail-safes, alerts, fail-closed rules

If you only do one thing: implement at least one control at each level.


Position sizing for no-code bots (fixed vs dynamic)

Position sizing is where most bot risk begins—because a small bug can become a huge position.

Fixed sizing: simplest, but risky when conditions change

Fixed sizing = always trade the same lot/contract size.

Pros

  • Easy to implement
  • Predictable

Cons

  • If equity drops, the same size becomes a higher % risk
  • If volatility rises, stops need to be wider; fixed size makes that more expensive
  • Symbol mix-ups can accidentally oversize

When it’s acceptable

  • Early testing with very small size
  • Low-frequency bots you’re actively monitoring

Equity-based sizing (risk % per trade): the default most should start with

Classic approach: “I risk 0.5% of equity per trade.”

Core formula (platform-agnostic):

[ \text{Position Size} = \frac{\text{Equity} \times \text{Risk %}}{\text{Stop Distance} \times \text{Value per pip/point}} ]

Key terms

  • Equity: balance plus floating P&L.
  • Stop distance: distance from entry to stop-loss (pips/points/$).
  • Value per pip/point: $ gained/lost per pip/point at a given size (instrument/broker-specific).

Worked example

  • Equity: $5,000
  • Risk per trade: 0.5%
  • Risk dollars: $5,000 × 0.005 = $25
  • Stop distance: 20 pips
  • Allowed risk per pip: $25 / 20 = $1.25 per pip

Now convert $1.25/pip into a lot size using your broker/platform’s pip-value info. (This varies by broker, instrument, and account currency—don’t guess.)

Where to get pip/point value

  • Broker contract specs / symbol details
  • Platform instrument info (tick size/tick value)
  • Exchange contract spec page (futures/perps)
  • Bot platform fields like tickValue, pipValue, contractSize (if exposed)

Volatility-based sizing (ATR / stop-distance sizing): best when available

If your platform exposes ATR (Average True Range) or similar metrics, you can adapt to market conditions:

  • Set stop distance as a multiple of ATR (e.g., stop = 1.5 × ATR)
  • Size the position so risk stays constant as ATR changes

Why it helps

  • Volatile markets → stops widen → size shrinks automatically
  • Calm markets → stops tighten → size can increase (within caps)

If ATR isn’t available, keep it simple:

  • Use your strategy’s stop distance
  • Add a max stop-distance sanity check (below)

Minimum/maximum size caps (avoid “size drift”)

Always enforce caps. They protect you from:

  • Pip-value bugs creating huge positions
  • Bad equity snapshots (null/zero)
  • Trading so small that fees dominate

Useful caps:

  • Min size: don’t trade below this (or disable entries)
  • Max size: never exceed this
  • Max leverage cap: limit total notional exposure (if supported)

Practical defaults (if you’re unsure)

These are starting points, not universal rules:

  • Risk per trade: 0.25%–0.5% of equity
  • Use equity-based sizing (not balance)
  • Require a stop-loss on every trade
  • Add caps:
    • Max position size (instrument-specific)
    • Max stop distance (e.g., “skip trades with stops wider than X pips/points”)

Max loss limits: per trade, per day, and per week

Stop-losses limit a trade. They don’t limit a day or a week. Bots need circuit breakers.

Per-trade max loss: define it in dollars/percent

Per-trade loss control comes from:

  1. Correct sizing
  2. A real stop-loss attached to the order
  3. A sanity check that the stop exists and isn’t absurdly far

Good trade sanity rules:

  • Reject if stop-loss is missing
  • Reject if stop distance > MAX_STOP_DISTANCE
  • Reject if calculated size > MAX_POSITION_SIZE
  • Reject if spread > MAX_SPREAD (see execution guards)

Daily loss limit: stop trading for the day

Daily limits prevent a bad morning from becoming a disaster.

Simple rule:

  • If Daily P&L ≤ -2% of equity:
    • Disable new entries until the next reset
    • Optionally keep managing open positions (usually yes)
    • Send an alert + log a reason code

Example ($5,000 account)

  • Risk per trade: $25
  • Daily max loss: 2% = $100
    After about 4 full losses, entries stop.

Weekly drawdown cap: prevent the slow bleed

Without a weekly cap, a bot can lose “only 1% per day” and still hurt you badly by Friday.

Simple weekly rule:

  • If Week-to-date P&L ≤ -5%, disable entries until weekly reset (or manual review)

Especially important for:

  • High-frequency bots
  • Mean-reversion systems that can unravel in strong trends

Absolute vs trailing drawdown (what you can enforce reliably)

  • Absolute drawdown: compare equity to a fixed point (Monday open, start-of-week equity).
  • Trailing drawdown: compare equity to the peak (requires tracking PEAK_EQUITY reliably).

If your platform’s state storage is shaky, absolute is simpler and less bug-prone.

Reset rules: pick one and stick to it

Resets cause real bugs. Choose one:

  • Broker server “day” (common in FX)
  • Midnight UTC (simple)
  • Rolling 24h (harder)

Whatever you choose:

  • Log the reset timestamp
  • Test across weekends and DST (if broker time uses DST)

Kill switches (the big red button)

A kill switch is what you want when the bot enters a state you didn’t plan for.

When the kill switch should trigger

Common triggers:

  • Daily loss limit hit
  • Weekly drawdown cap hit
  • Repeated order errors (e.g., 3 rejects in 5 minutes)
  • Spread above an “insane” threshold (disorder/rollover)
  • Stale/missing data (null equity, null price)
  • Connector/API disconnected
  • Unexpected position state (partial fill mismatch, position differs from expected)

Principle: unknown state = stop.

Soft stop vs hard stop

You typically want both:

  • Soft stop

    • Stop opening new trades
    • Continue managing existing trades
    • Often safer (avoids panic exits during chaos)
  • Hard stop

    • Close all positions + disable bot
    • Use for severe errors, runaway logic, or when you can’t trust trade management

Hard stops can lock in terrible fills during news spikes—use strict triggers.

Manual override: regain control safely

Make re-enabling intentional:

  • Manual toggle: BOT_ENABLED = true
  • After re-enable:
    • Add a cool-off (15–60 minutes)
    • Review/reset counters (stop reason, error logs)
    • Confirm spreads are normal before first entry

Alerting: make sure you notice

At minimum:

  • Push/email when kill switch triggers
  • Include:
    • reason code (e.g., DAILY_LIMIT_HIT)
    • equity snapshot
    • open positions count
    • timestamp + reset time

Trade frequency limits and cooldowns (prevent loops)

Overtrading is a classic no-code failure mode: duplicated signals, webhooks firing twice, or re-entry loops.

Max trades per day/session per symbol

Simple caps:

  • Max trades/day per symbol
  • Max trades/day total
  • Max entries per session (Asia/London/NY) if you use sessions

Beginner-friendly defaults:

  • 1–5 trades/day per symbol (unless your strategy truly needs more)

Cooldown after a loss (and after a win)

Cooldowns reduce churn.

Two useful versions:

  • After a loss: pause entries for X minutes or N candles
  • After a win: pause entries to avoid giving it back in chop

Typical ranges:

  • 30–120 minutes, or “wait 3–10 candles” on your timeframe

Duplicate-signal protection (debounce)

This one saves accounts. Implement at least one:

  • One entry per candle/bar
  • Store a signal_id and ignore duplicates for X minutes
  • Store LAST_SIGNAL_TIME and require a minimum gap (10–60 seconds)

If supported, make order placement idempotent:

  • Same signal twice → second run detects “already acted” and does nothing.

Time-of-day filters (thin liquidity / spread widening)

Avoid predictable bad windows:

  • FX rollover/spread widening (timing varies by broker)
  • Low-liquidity hours for your asset
  • Weekends/maintenance windows (especially crypto)

If you can’t be precise, start with what you can verify:

  • Block the 30–60 minute window where your spreads consistently get weird (based on your own logs).

Execution guards: spread, slippage, and liquidity filters

Execution is where backtests die. Bots need “don’t trade when it’s expensive or chaotic” rules.

Spread guard: block entries when costs spike

Two approaches:

1) Absolute threshold (easy)

  • Example: “Trade EURUSD only if spread ≤ X pips”
  • Choose X based on normal spreads for your broker/account type.

2) Dynamic threshold (better if available)

  • Example: “spread ≤ 2 × median spread over last N minutes”
  • If you can’t calculate medians/rolling stats, use the absolute rule.

Log a reason code like SPREAD_TOO_HIGH.

Slippage guard: reject fills beyond tolerance

Depends on venue/platform:

  • Some allow max deviation or stop-limit orders.
  • Some are market-order only.

If you can control slippage:

  • Set a conservative max and reject/skip if exceeded.

If you can’t:

  • Prefer limit/stop-limit where possible
  • Use news blocks + spread guards
  • Optionally: if measured slippage exceeds a threshold, disable and alert (don’t auto-reverse unless you’ve tested it extensively)

Market vs limit orders for bots

  • Market: more fills, more slippage risk
  • Limit/stop-limit: price-controlled, but you’ll miss trades (often fine if you’re risk-first)

Common compromise:

  • Limit/stop-limit for entries
  • Market for exits only if you must (with safeguards)

Partial fills and re-quotes

If detectable:

  • Treat partial fill as “reconciliation required”:
    • Stop new entries
    • Alert
    • Sync actual vs expected position size

If not detectable:

  • Reduce complexity: fewer symbols, smaller size, simpler logic until you trust fills/reporting.

Missing/late data: fail closed

Non-negotiable: if required inputs are null/stale, block entries:

  • equity missing
  • spread missing
  • price feed timestamp too old
  • positions can’t be fetched
  • calendar flag unknown (if you rely on it)

Reason code: DATA_STALE / DATA_MISSING.


News and event blocks (regime-change protection)

News is where spreads and fills can break.

Which events matter most (FX)

High-impact scheduled events often include:

  • CPI/inflation releases
  • Major employment reports (e.g., NFP equivalents)
  • Central bank decisions + press conferences
  • Major speeches (harder to filter without a good calendar)

Why it matters:

  • Spreads widen
  • Slippage increases
  • Gaps can jump stops

Block windows: X minutes before/after

Common starting point:

  • 15–60 minutes before
  • 15–60 minutes after

Tune based on:

  • Your timeframe (lower timeframe usually needs wider blocks)
  • Your broker’s execution quality
  • Whether your strategy is news-sensitive (most aren’t built for it)

Asset-specific notes

  • FX: macro-sensitive → calendar filters help
  • Indices: CPI/rates matter; session opens matter too
  • Crypto: less schedulable → prioritize spread/volatility guards and maintenance windows

No calendar integration? Practical workarounds

  • Keep a weekly list of top events and toggle NEWS_BLOCK = true
  • Use an external calendar alert that triggers a webhook (if possible)
  • Add a manual “event day” toggle: BOT_ENABLED = false

Not perfect, but better than ignoring news.


Correlation and exposure limits (the risk many bots miss)

Your bot might “risk 0.5% per trade”… while holding 6 trades that are basically the same bet.

Max simultaneous positions and max total open risk

Two strong limits:

  • Max open positions (simple)

    • Example: max 2–4 positions total
  • Max total open risk (better)

    • Sum risk across open trades (based on stop distance and size)
    • Block new entries if total would exceed a cap (e.g., 1%–2%)

Per-symbol and per-direction caps

Useful caps:

  • Max 1 open trade per symbol
  • Max N trades in the same direction across a correlated set
  • No stacking into losers unless explicitly designed

Portfolio concentration (simple heuristic)

If you can’t compute correlations, use a crude exposure rule:

  • Long EURUSD + long GBPUSD = both effectively short USD
  • Cap how many positions share the same currency bias

Even rough limits reduce hidden leverage.

What to do when you’re at limits

Two options:

  • Block new entries (safest and simplest)
  • Reduce size for additional entries (more complex; easy to bug)

For no-code + risk-first: block entries.


A simple copy/paste risk policy (edit the numbers, keep the structure)

Use this as a mini spec for your bot. Numbers are placeholders—start conservative.

Risk policy template

A) Position sizing

  • Size method: Equity-based risk %
  • Risk per trade: RISK_PER_TRADE = 0.25% to 0.5% equity
  • Required stop-loss: STOP_REQUIRED = true
  • Max stop distance: MAX_STOP_DISTANCE = [X pips/points/%]
  • Min position size: MIN_SIZE = [instrument-specific]
  • Max position size: MAX_SIZE = [instrument-specific]

B) Loss limits (circuit breakers)

  • Daily max loss: DAILY_LIMIT = 2% equity
    • Action: soft stop (disable entries) until daily reset
  • Weekly drawdown cap: WEEKLY_LIMIT = 5% equity
    • Action: disable entries until weekly reset or manual review
  • Consecutive losses limit: MAX_CONSEC_LOSSES = 3
    • Action: cooldown COOLDOWN_AFTER_STREAK = 4–24 hours

C) Trade frequency / throttles

  • Max trades per day (total): MAX_TRADES_DAY_TOTAL = 5–15
  • Max trades per day per symbol: MAX_TRADES_DAY_SYMBOL = 1–5
  • Cooldown after any trade: COOLDOWN_MINUTES = 30–120
  • Debounce: ONE_ENTRY_PER_BAR = true
  • Idempotency window: ignore duplicate signal_id for X minutes

D) Execution guards

  • Spread guard: SPREAD <= MAX_SPREAD (per symbol)
  • Slippage guard (if supported): MAX_SLIPPAGE = [X pips/points]
  • Order type: prefer LIMIT/STOP-LIMIT when possible
  • Fail closed: if equity/price/spread/positions data is missing or stale → no trade

E) News/event blocks

  • High-impact events: CPI/inflation, major employment, central bank decisions
  • Block window: NEWS_BLOCK = true from T-30m to T+30m (adjust)
  • If no calendar: manual schedule + toggle

F) Exposure limits

  • Max open positions total: MAX_OPEN_POSITIONS = 2–4
  • Max open positions per symbol: MAX_OPEN_PER_SYMBOL = 1
  • Max total open risk: MAX_OPEN_RISK = 1%–2% equity

G) Kill switch + alerts

  • Kill switch triggers:
    • daily/weekly limit hit
    • 3+ order errors in 5 minutes
    • data stale/missing
    • spread above “insane spread” threshold
    • connector disconnected
  • Soft stop default; hard stop only for severe states
  • Alerts: email/SMS/push with reason code + equity + open positions

H) Logging

  • Every blocked trade logs a reason code:
    • DAILY_LIMIT_HIT, WEEKLY_LIMIT_HIT, COOLDOWN_ACTIVE, SPREAD_TOO_HIGH, NEWS_BLOCK, DATA_STALE, MAX_TRADES_REACHED, EXPOSURE_CAP, BOT_DISABLED

Suggested conservative defaults (if you want one set)

  • Risk per trade: 0.25%
  • Daily limit: 2%
  • Weekly cap: 5%
  • Max open positions: 2
  • Max trades/day per symbol: 2
  • Cooldown after loss: 60 minutes
  • News block: 30 minutes before/after

What to adjust first:

  • High frequency → tighter daily loss + stricter trade caps
  • Swing trading → fewer trades/day, longer cooldowns, still block major news

Go-live checklist (prove it’s enforced)

Before real money:

  • Stop-loss is attached to every entry (verify at broker/exchange)
  • Position size changes when equity changes
  • Spread guard blocks trades when you tighten the threshold (test)
  • Daily stop blocks new entries after simulated losses
  • Weekly cap blocks after simulated drawdown
  • Duplicate webhook test places only one trade
  • Reset happens at the intended time (logged)
  • Kill switch alert reaches you within 1 minute
  • Logs show a reason code for every “no trade” decision

How to implement this in most no-code bot builders (platform-agnostic logic)

The basic pattern: Inputs → State → Conditions → Actions

Most no-code systems can support this, even if the UI looks different.

Inputs

  • Signal (buy/sell, symbol, stop distance, optional signal_id)
  • Price + spread
  • Equity/balance
  • Open positions (count, symbols)
  • Time (timestamp, session)
  • News block flag (calendar or manual toggle)

State (persistent variables)

  • BOT_ENABLED (true/false)
  • TRADES_TODAY_TOTAL, TRADES_TODAY_SYMBOL[SYM]
  • DAILY_PNL (realized or equity-change proxy)
  • WEEKLY_PNL
  • CONSEC_LOSSES
  • LAST_TRADE_TIME
  • DAILY_STOP_HIT, WEEKLY_STOP_HIT
  • Optional: PEAK_EQUITY (for trailing DD)

Tracking P&L when the platform is limited

Reality check:

  • Some platforms provide realized P&L.
  • Some don’t. In that case, use equity snapshots:
    • Store EQUITY_AT_DAY_START
    • DAILY_PNL = current_equity - EQUITY_AT_DAY_START
    • Same idea weekly

Not perfect (floating P&L matters), but workable if you clearly define that limits are equity-based.

Pseudologic examples (if/then rules)

1) Entry gate (one place to rule them all)

IF BOT_ENABLED = true
AND NOT NEWS_BLOCK
AND SPREAD <= MAX_SPREAD
AND DATA_IS_FRESH = true
AND DAILY_STOP_HIT = false
AND WEEKLY_STOP_HIT = false
AND TRADES_TODAY_TOTAL < MAX_TRADES_DAY_TOTAL
AND TRADES_TODAY_SYMBOL[SYM] < MAX_TRADES_DAY_SYMBOL
AND NOW - LAST_TRADE_TIME >= COOLDOWN_MINUTES
AND OPEN_POSITIONS_TOTAL < MAX_OPEN_POSITIONS
AND OPEN_POSITIONS_SYMBOL[SYM] < MAX_OPEN_PER_SYMBOL
THEN ALLOW_ENTRY
ELSE BLOCK + LOG_REASON

2) Daily stop

IF DAILY_PNL <= -DAILY_LIMIT
THEN DAILY_STOP_HIT = true
AND BOT_ENABLED = false (or ENTRIES_ENABLED = false)
AND SEND_ALERT("DAILY_LIMIT_HIT", equity, DAILY_PNL)

3) Cooldown after consecutive losses

IF CONSEC_LOSSES >= 3
THEN BOT_ENABLED = false
AND SET REENABLE_TIME = NOW + COOLDOWN_STREAK_HOURS
AND SEND_ALERT("LOSS_STREAK_STOP", CONSEC_LOSSES)

4) Extreme spread kill

IF SPREAD >= INSANE_SPREAD_THRESHOLD
THEN BOT_ENABLED = false
AND SEND_ALERT("SPREAD_KILL", spread)

5) Fail-closed rule

IF equity IS NULL OR price IS NULL OR spread IS NULL OR data_age_seconds > MAX_DATA_AGE
THEN BLOCK_ENTRY
AND SEND_ALERT("DATA_STALE")

Testing: paper, small live, and failure-mode simulations

Don’t skip failure-mode tests—you’re testing the risk system, not just the strategy.

Simulations to run:

  • Duplicate webhook → only one order
  • Set MAX_SPREAD extremely low → bot blocks entries
  • Simulate 4 losses → daily stop triggers and persists
  • Disconnect connector/API (if possible) → bot fails closed + alerts
  • Reset test → daily counters reset correctly

Then go live with:

  • Minimum size
  • Strict limits
  • Logs on
  • Alerts on

Common mistakes (and how to avoid them)

Sizing from balance instead of equity

Balance ignores open losses. Equity doesn’t.

  • Balance-based sizing can oversize when positions are underwater.

Default: size off equity unless you have a specific reason not to.

Relying on stop-loss only (no circuit breakers)

Stops don’t prevent:

  • long losing streaks
  • overtrading loops
  • slow account bleed

Add daily + weekly limits.

Ignoring fees/spread in testing

A bot that wins small can lose after real costs—especially during volatility.

Assume:

  • costs worsen during news/volatility
  • spreads widen at the worst times
  • slippage exists

Reset bugs

Timezone mismatches are brutal. Fix this by:

  • choosing one reset standard (UTC or broker time)
  • logging reset timestamps
  • testing across weekends/DST if relevant

Soft stop that leaves unmanaged positions

If entries stop but position management is broken, you’re still exposed.

Decide upfront:

  • What happens to open trades when the kill switch triggers?
  • Who manages them next (you vs bot)?

Action plan: set up your bot’s risk controls in 60–90 minutes

Step 1: Pick per-trade risk and hard limits

  • Risk per trade: 0.25%–0.5%
  • Daily and weekly loss limits
  • Max consecutive losses
  • Max stop distance + size caps

Step 2: Add execution and news filters

  • Spread guard (absolute threshold per symbol)
  • Slippage approach (limit orders or “disable on excessive slippage”)
  • News block (calendar or manual toggle)

Step 3: Add trade caps and cooldowns

  • Max trades/day (total + per symbol)
  • Cooldown after trade and/or after loss
  • Debounce: one entry per bar + idempotency window

Step 4: Add kill switch + alerts

  • Soft stop + optional hard stop
  • Alerts with reason codes
  • Manual, frictioned re-enable

Step 5: Test with logs before scaling

  • Paper/forward test
  • Failure-mode simulations
  • Live with minimum size first, then scale slowly

FAQ

What’s the minimum set of controls that reduces blow-up risk?

Use a 3-level stack:

  1. trade-level sizing + hard stop-loss + spread/slippage checks
  2. day/week circuit breakers (daily loss, weekly cap, trade caps/cooldowns)
  3. system-level kill switch + alerts + fail-closed rules for missing data/connectivity

How do I calculate position size using equity, risk %, and stop distance?

Position size = (Equity × Risk%) ÷ (Stop distance × value per pip/point).
Example: $5,000 equity × 0.5% = $25 risk. If stop is 20 pips, that’s $1.25 per pip. Convert $/pip to lots using your broker’s pip/tick value.

Should my bot size from balance or equity?

Usually equity. It includes floating P&L, so sizing adapts during drawdowns. Balance-only sizing can increase risk while open trades are losing.

What’s a reasonable default risk per trade for beginners running automation?

A conservative range is 0.25%–0.5% of equity per trade. Keep it small until you’ve proven live execution and logic.

How do I implement a max daily loss limit in a no-code builder?

Track daily P&L (or equity change) in state. If DAILY_PNL <= -DAILY_LIMIT, disable entries until reset and send an alert. If realized P&L isn’t available, approximate with equity snapshots at a fixed daily reset time.

Daily loss limit vs weekly drawdown cap—do I need both?

Daily limits stop a bad day. Weekly caps stop the “reset and bleed” pattern where the bot loses a little each day. For frequent trading, having both helps survivability.

How do I stop my bot after 3 losses in a row?

Maintain CONSEC_LOSSES: increment after a losing closed trade, reset after a win. If it hits your threshold, trigger a cooldown or require manual review.

What should a kill switch do: stop entries or close positions?

Have both modes. Soft stop (stop entries, manage existing trades) is usually safer. Hard stop (close all + disable) is for severe errors or unknown states. Use hard stops sparingly.

How do I prevent duplicate webhook signals from placing multiple orders?

Use idempotency: store a signal_id (or timestamp + symbol + direction) and ignore duplicates for a time window. Also enforce one entry per bar/candle and/or a short debounce timer.

How should I set a spread threshold?

Start with an absolute threshold per symbol based on normal spreads for your broker/account. If your platform can compute rolling stats, you can use a dynamic rule (e.g., under 2× recent median). If not, stay conservative and avoid known wide-spread windows.

Can I control slippage if I can only place market orders?

Not directly. The safer workaround is to avoid volatile periods (news blocks/time filters), enforce spread guards, and fail closed when conditions are abnormal. If you can measure slippage after the fact, consider disabling and alerting when it exceeds your threshold.

Which news events are most dangerous for FX bots, and what block window should I use?

CPI/inflation, major employment releases, and central bank decisions often cause spread widening and slippage. Common block windows are 15–60 minutes before and after, depending on timeframe and your broker’s execution quality.

trading bot risk management, no-code trading bots, position sizing, max daily loss limit, drawdown limit, kill switch, spread and slippage, news filter, trade frequency limit, automated trading

Would you like to contribute content to this article? Contact us today!


No comments yet. Be the first to comment on this article!