Advanced mode config.yaml

The complete reference for your SPX and XSP bot configuration, 0DTE included: every key the engine honors. Your configuration is a YAML file with three parts: global settings, reusable templates, and the list of bots themselves.

Not configured here. Your IBKR account (required) and Telegram bot token (optional) are entered in Settings → Connections and held encrypted; they never appear in this file. See Settings, and Telegram for the one extra step a bot needs before it can message you.

Data types

Templates

Defining a template

templates: define named partial bot configs; a bot sets template: <name> and the two are deep-merged with the bot's keys winning. Templates carry the shared shape (type, spread, stop block, order algos, filters); bots carry identity (name, openTime, deltas, qty).

A template can name a template: of its own, and a bot on it gets the whole chain, each template's keys winning over its parent's. If a link in the chain names a template your file does not have, or the chain loops back on itself, every bot on that chain is refused (the config check names the broken link) rather than loaded without the settings the missing template held.

How merging works

Most keys replace: set one on the bot and the template's value is gone. A few behave differently, and the difference matters because it is invisible in the file.

Time

Time zone

Every time on this page is ET wall-clock. There is no time-zone setting, in this file or in your account: every time is New York time, the exchange’s clock, so a bot written for 09:31 fires at 09:31 in New York wherever you are. A timezone line left in the file is not read, and the config check asks you to remove it.

The entry window

openTime fires on the second. If the entry cannot be placed straight away it keeps retrying inside openTimeWindow, and stops at latestEntryTime if you set one.

Three things end the window early, because another try on the same board cannot change the outcome and each retry holds up the bots scheduled at the same time:

A pick that moves to different strikes, a different refusal, or a premium that is climbing toward your minPremium keeps retrying as before. So does a pass where the market data simply wasn’t there (no quotes, no market at submit); those recover when the feed does.

Market close

Monitoring runs until the close. Anything still open then is left to cash-settle: positions are never flattened just because the day ended. Use beforeExpirationTime if you want a timed exit instead.

On an early-close day (the market closes at 1:00 p.m. ET) the close is 1:00 p.m. for everything on this page:

Order algorithms

A lookup for the two bot-level keys that name an algo: openOrderAlgo on entries and stop.orderAlgo on exits. There is no global order-algo setting.

Used by openOrderAlgo (entries) and stop.orderAlgo (exits).

Entry semantics: Normal, Fast, and Slow share the same mechanics: one initial order plus up to 5 adjustments, priced one tick above the fresh net mid (giving a tick per adjustment; never crossing), and differ only by the adjustment interval. openOrderTimeout caps how long the order works; see openOrderTimeout for what follows it.

Normal

adjust every 6s (the entry default).

Fast

every 3s (the stop default).

Slow

every 15s (the 30s timeout cuts it short).

What the interval costs in practice. A rung is the interval: the working order is amended in place rather than cancelled and re-placed, so it rests throughout and there is one cancel-and-confirm at the end, not one per rung. Fast runs its six rungs in about 18 seconds and is finished well inside a 30s openOrderTimeout. Inside the same 30s Normal gets about five rungs and Slow about two, so for those two the timeout is what ends the attempt. Raising openOrderTimeout gives Normal and Slow more rungs; it gives Fast nothing.

AdaptiveNormal

IBKR's own Adaptive algo at its Normal priority: TradeMint sends a limit order with Adaptive attached, and IBKR works it inside that limit. On an entry, a multi-leg spread goes out as one combo limit order that TradeMint does not adjust, and openOrderTimeout ends it with a cancel, as it ends every entry. A single-leg entry (a naked or long put or call, a strangle's legs) walks from inside the mid like Normal, with Adaptive on each rung, and never crosses. On an exit (stop.orderAlgo) every rung of the close ladder carries Adaptive, and the close still goes to market if the ladder does not fill, because a stop must complete.

AdaptiveUrgent

The same, at Urgent priority: IBKR gives up some price for a quicker fill.

AdaptivePatient

The same, at Patient priority: IBKR waits longer for a better price, so an entry is more likely to reach its timeout unfilled.

Relative

exits only. A native IBKR pegged-to-primary exchange order (REL); it follows the NBBO on your side with a one-tick offset, and the limit you would otherwise have used becomes the cap. Not pegged-to-midpoint: that is a different IBKR order type (PEG MID) which the exchange refuses for SPX options, and shipping it by mistake had every close rejected for a full session on 2026-07-29. On openOrderAlgo it is not available: an entry that asks for it is worked as Normal. The config check accepts it there without a warning, so name the entry algo you want.

Market

exits only; entries never market a multi-leg combo.

All entry chases are position-aware: each rung places only the remaining quantity, fills are re-summed across every rung before each placement, a rung never goes out while a prior rung is non-terminal, and two consecutive rejections abort the attempt.

Global configuration

The settings at the top of the file, outside templates: and bots:, because they apply to the whole file rather than to one bot. Anything a single bot needs is set on that bot.

strategy

Required·no default

The name this file's bots trade under. It groups their positions and P&L on the dashboard, and each configuration file has its own. Save a copy of a configuration and the copy keeps your bots but gets a name of its own, made from its file name (Version 2.yaml trades as Version_2); the editor says which name it got, and the original keeps its name and its history. A new configuration starts out named after its file.

pause

Optional·[default: false]

Start with the whole ladder paused (true/false). pause: true sets the shared trading halt at session start, so /resume (Telegram) or the dashboard Trading toggle lifts it just like a runtime /pause; the pause is resumable, not a permanent session kill. Each bot checks it at its own entry time, so a bot whose entry time passes while paused skips that entry and every bot after the /resume trades. The pause survives a restart until an explicit /resume, so leaving pause: true in the config re-halts every launch. Runtime equivalents: /pause//resume and the dashboard Trading toggle. Open positions stay monitored while halted (stops stay active).

notifications

Optional·[default: the portfolio line every 30 minutes, the start-of-day report at 08:00, the end-of-day report at 16:01]

Which alerts reach you, and where, is not set in this file. It is set in Settings → Alerts (Settings), and only there. This block holds just when the timed reports go out.

notifications.channels and notifications.enabled, the two keys that switched alerts until 2026-09-27, are no longer read. What they said was carried over to Settings → Alerts once, when the switches moved, so nothing changed. If either is still in your file, the config check names it so you can delete it.

notifications.schedule (optional) times the recurring and once-a-day reports:

config.yaml
notifications: schedule: portfolio: {every: 30m} # recurring status while positions are open start_of_day: {at: "09:00"} # once/day end_of_day: {at: "16:01"} # the end-of-day trio starts here (16:01 / 16:02 / 16:03)

portfolio.every is a wall-clock cadence; the last-print time is persisted, so a restart catches up a missed mark instead of blacking out for a full interval. start_of_day fires once at its at time and is recorded per day so a restart can't re-send it. Absent → defaults 30m / 08:00.

The end-of-day close report is the 16:01–16:03 trio (tag summary → per-bot day summary → the day chart). With no schedules of your own, it is derived from schedule.end_of_day.at (absent → 16:01); a schedules list replaces it. Whether it is sent, and where, is the End of day switch in Settings → Alerts.

The end-of-day trio stays quiet when there is nothing to report. On a weekday the market is closed for a holiday the prints are skipped entirely. On a trading day where nothing opened and nothing closed, you get a single line instead of a summary of zeros, a per-bot list of nothing and a flat chart. A day that opened without closing still reports in full, because held-to-expiry positions settle rather than close. If the check itself fails, the reports send anyway: losing the day's only report is worse than a redundant one.

confirmEnable

Optional·[default: false]

Not implemented; setting this has no effect. /enable re-arms a bot with no confirmation, and so do the dashboard's switch and /config. The key is documented here only so that finding it in an old config does not imply a protection you do not have.

openOrderTimeout

Optional·[default: 30]

How long an entry order may work (all chase rungs together), in seconds, before the combo is cancelled. Cancelling takes up to about 12 seconds more on an order that did not fill: up to 4 for the cancel to be confirmed and 8 to catch a fill that raced it. So with the default of 30, allow about 42 seconds when you size an entry window for a bot that may not fill. The chase can also end sooner: Fast is done after its six rungs, about 18 seconds. Settable per bot as well as here; the bot value wins. Written openOrderTimeoutSeconds before 2026-08-15 and that spelling still works, so an existing file needs no edit.

Write a plain number of seconds. On a bot, openOrderTimeout: 30s (a unit, a word or a yes/no) is refused by the config check, and that bot does not run until it is fixed. The same value in the file-wide setting is not read: the 30-second default applies, the config check warns when you save it, and the engine says so at start with a Configuration Warning on the Activity feed.

0 is not "no timeout". A 0 does not switch the entry timeout off, and the order does not rest until it fills: TradeMint never leaves an entry working without a limit, and no order works past the closing bell. A bot's 0 means unset (the file's own openOrderTimeout, else 30 seconds); the file's 0 means the 30-second default. Saving a 0 shows a warning saying so: write the number of seconds you want.

autoEnable

Optional·[default: false]

Whether a bot the engine has never seen before starts switched on. The default is false, so adding a bot to your file arms nothing until you enable it, unless its own entry says enabled: true (see enabled), which arms it at the restart that loads it: a config that grows a bot cannot start trading it without you saying so. Written autoEnableNewBots before 2026-08-15 and that spelling still works.

maxDailyStops

Optional·[default: 0 (no cap)]

Per-bot when set alongside a bot or template's stop settings: once this bot has hit that many stops it stops entering (ENTRY_SKIP reason=maxDailyStops/bot); other bots keep going. A global maxDailyStops (top-level) remains a session-wide backstop: once this many stops fire today (across all bots, including adopted positions), every remaining entry is skipped: one Telegram alert when the throttle engages, then a quiet ENTRY_SKIP reason=maxDailyStops per bot. Open positions stay fully monitored; only new entries halt. 0 disables. Default 0.

Write a whole number. A negative number (-1 does not mean "unlimited") or a yes/no is refused by the config check. On a bot, that bot does not run until it is fixed; in the file-wide setting the engine reads it as 0, no cap, and says so at start.

A position counts as a stop when it closes on a loss exit, and each position counts at most once. A profit target, a trail, the breakeven lock, the timed exit and a manual close never count.

Until 2026-11-12 a credit spread counted its delta stops only. Today's stops survive a restart (a crash, a Save and Restart, an update): they are counted again from today's records, so a bot at its cap stays at its cap. A doubleUpBeforeExpiration copy's stops count toward the bot it copies, so a bot at its cap does not double up.

dailyLossCap

Optional·[default: 0 (off)]

Your daily stop, in dollars of loss. dailyLossCap: 4000 stops all new entries for the rest of the session once today's P&L reaches −$4,000: what you have realised plus what your open positions are worth right now, the same figure as the dashboard's P&L chart. Every other brake in the engine counts events; maxDailyStops counts stops, and a count cannot tell twenty-five small stops from twenty-five that cost you nine thousand dollars. This one counts money, and it is the only account-level brake that does. There is no per-bot circuit breaker.

config.yaml
dailyLossCap: 4000 # stop opening new positions once today's P&L (realised + open) is −$4,000

It stops entries; it does not liquidate. Everything already open keeps its monitor, its delta stops, its profit target, its scales and its timed exit. A cap that closed the book would market-order every position at the worst moment of the worst day, which is worse than the loss it is braking.

Why open positions count. A credit spread that is stopped out books its loss at once; one that works books its credit only when it expires at 16:00. Counting closed trades alone would read every afternoon as worse than it is, and could stop your entries on a day your open positions were already making the loss back.

It does not un-trip. Once the cap is reached the session is over for new entries, even if open positions recover. Size it as the day you would walk away from, not as a number you expect to touch, and look at your own worst intraday trough, which is deeper than any end-of-day figure, before picking it.

Absent, 0, negative and unreadable all mean off, so a typo can never arm a brake you did not choose. If your platform operator has set a cap for your account you can set a tighter one here, but not a looser one: the lower of the two applies.

minExcessLiquidity

Optional·[default: the platform’s floor]

The cash cushion TradeMint keeps in reserve, in dollars. Before it opens a defined-risk trade the engine works out what that trade will tie up in margin and checks what would be left. If the answer is below your cushion, it skips the entry: one clean ENTRY_SKIP reason=margin_headroom instead of a handful of orders your broker rejects one by one.

A naked put or call and a short strangle are checked too, on an estimate: the strike is not chosen yet when the check runs, so it is guessed from the bot's out-of-the-money target (at the money when the bot picks by delta), and the margin is worked out with the standard broker formula for a naked short (a strangle takes its larger side). When the index price cannot be read, the margin cannot be estimated and the entry is skipped rather than let through unchecked: the Activity feed shows Could not read your buying power from IBKR, and the Telegram notice says the price couldn’t be read for the margin check. A long put or call ties up no margin and is not checked.

config.yaml
minExcessLiquidity: 20000 # keep at least $20,000 spare before opening anything new

You can only raise it. The platform holds a floor underneath, and a number at or below that floor is ignored: your config saves, and the editor tells you the value did not apply. There is no way to lower the cushion and no way to switch it off. That is deliberate: this guard exists because an account that runs out of margin mid-session does not fail gently, and the direction that protects you is the only direction on offer.

A bigger cushion means fewer trades. It is the same brake whichever way you look at it. Set it well above your spare cash and nothing will be placed at all, so raise it in steps and watch a session before raising it again.

At boot your engine records the cushion it is using and where the number came from, so you can always confirm which one is in force.

stopGracePeriodMs / hardDeltaStopGracePeriodMs

Optional·[default: 500ms]

The file-wide default for every bot's stop grace, in milliseconds. stopGracePeriodMs is the default for each bot's gracePeriodMs (the soft stops) and hardDeltaStopGracePeriodMs the default for each bot's hardGracePeriodMs (the hard delta stop). A bot that sets its own value inside stop:, or names a template whose stop: does, uses that value instead; every other bot in the file uses this one.

config.yaml
stopGracePeriodMs: 800 # every bot confirms a soft breach for 800ms unless its stop: says otherwise hardDeltaStopGracePeriodMs: 300 # and a hard breach for 300ms

Unset, both are 500ms. A value that is not a number ("800ms") is refused by the config check when you save. A file that already holds one runs every bot on the 500ms default, and the engine says so at start with a Configuration Warning on the Activity feed. If your platform operator has set a grace default for your account, theirs applies to every file in place of the one written here.

schedules

Optional·[default: the end-of-day trio from notifications.schedule.end_of_day]

Config-driven scheduled prints, declarative. Write it under notifications.schedules (the top-level schedules: spelling still works).

Not set, or []: you get the trio below, starting at notifications.schedule.end_of_day.at (default 16:01). Set, and your list is the whole schedule; the derived trio is not added to it, so keep its three rows if you still want them. To have no end-of-day prints at all, switch End of day off in Settings → Alerts.

config.yaml
schedules: # the end-of-day sequence - {at: "16:01", action: summary} # 1) tag-grouped Daily Summary (below) - {at: "16:02", action: day} # 2) per-bot daily summary (stats + realized premium by position) - {at: "16:03", action: daychart} # 3) the dashboard's intraday P&L chart as a photo - {at: "09:28", action: chart, args: "30"} # 30-day equity curve before the open

The summary/day actions gate on the settlement reconcile when fired in the 16:00–16:15 window: they hold (up to 5 minutes, then print best-available) until the engine's post-close pass has booked today's settlements, so the 16:01 print carries final numbers without a fixed buffer.

at = ET wall-clock "HH:MM"; action = daychart | chart | status | summary | day (day = the /day core stats plus winning trades and the per-position realized list, each line bot: $pts ($dollars) sorted by bot name, a per-bot end-of-day print); args = the same argument the command takes (strategy for daychart/status, days for chart); optional days: [0..4] weekday filter (default Mon–Fri; the end-of-day actions also skip market holidays). Executed by the Telegram service (it must be running; a missed summary/day/daychart slot is still sent up to 30 minutes late, any other missed minute is skipped), sent to your Telegram chat; each entry fires once per day, and a restart never re-sends one. The service re-reads the active config when it changes, so an edit or a config switch takes effect without a restart. Malformed rows are dropped at load.

summary

Optional·[default: not set]

The line layout for the summary action and /summary. Default reproduces the standard print from the tags your ladder already carries:

config.yaml
summary: - {label: "AM Calls", tags: [amcalls]} - {label: "AM Puts", tags: [amputs]} - {label: "AM total", tags: [am]} - {label: "PM Calls", tags: [pmcalls]} - {label: "PM Puts", tags: [pmputs]} - {label: "PM total", tags: [pm]} - {label: "Held to expiry", tags: [mte]} # held-to-expiry bots with no am/pm tag surface here; # without a row their P&L only shows in Total

A bot counts toward a row when it has every tag in the row's list. Tags are additive through the template chain: a bot's own tags: extend its template's rather than replace them: a bot tagged [lp] on a template tagged [0dte, am, amputs, shorts] resolves to all five, so it counts toward the AM rows and /close lp alike. Total and NLV come from the canonical NLV-based day series (the same numbers as the dashboard and /daychart); the group dollar lines sum the day's realized per bot: trades closed intraday, plus each expiry's settlement realized once the post-close reconciler runs (~16:05, automatic at session end). Settlement covers every SPX credit shape that rides to the close (spreads, IronCondors, naked puts and calls, and ShortStrangles), so an all-expired group no longer reads $0.00. Schedule the summary print after that (e.g. 16:06) for final numbers. Percentages are versus the day-baseline NLV.

expressions

Optional·[default: not set]

Named conditions, written once at the top of the file and used by any bot. Each entry is a name and a quoted string in the entryFilter language; a bot calls it as name():

config.yaml
expressions: calmAM: "vix() < 20 && spx() > 6000" eventDay: "FOMCFilter() || CPIFilter()" bots: - name: P 0931 entryFilter: "calmAM() && !eventDay()" sizeFactor: "1 - 0.5*eventDay()" # half size on an event day

General bot configuration

name

Required·no default

Display name and trade id ("SPX Put Credit Spread"). It is not cosmetic: the name you write here is the identifier every trade, log line, Telegram alert and dashboard row is filed under. An iron condor in independent mode files its two sides as <name>#P and <name>#C, and a kept long as <name>#L. Rename a bot and its new trades file under the new name; the old ones keep the old one.

Quote a name that YAML would read as something other than text. name: On is not the word “On”: YAML reads bare on, off, yes, no, true, false (any case) as booleans, a bare 2026-09-08 as a date and a bare 42 as a number. Any of those refuses that one bot at start-up, with a message naming the file and the entry, and the rest of your bots trade as usual. Quote it (name: "On") and you get the word you wrote. # is reserved, because it is what suffixes the per-side and kept-long ids above.

template

Optional·[default: not set]

Which template to merge (see Templates). The same quoting rule as name applies: template: Off is the boolean false, not a template called “Off”, and refuses that bot rather than silently loading it with none of its template's settings.

tags

Optional·[default: not set]

Labels for grouping bots: the summary rows and /close <tag> pick bots by them. Write a list:

config.yaml
templates: - name: pcs_am tags: [0dte, am, amputs] bots: - name: P 0931 template: pcs_am tags: [lp] # resolves to [0dte, am, amputs, lp]

Tags are additive: a bot's own tags: extend its template's (and that template's own template's) rather than replace them, in order, with each label once. A single label without brackets (tags: lp) is read as the one-item list [lp]. A number, true/false or a block of settings is not a label list and refuses that one bot, with the rest of your bots trading as usual.

symbol

Optional·[default: SPX]

Underlying, SPX (default) or XSP (the 1/10th mini). SPX trades the PM-settled SPXW daily chain (5-point strikes, ±250-point scan band); XSP trades its own option class (1-point strikes, ±25 band). Strike selection, combo construction, sizing, adoption, and the lossITM stop are all symbol-aware. XSP support is newer and not yet live-validated; run one paper entry before trusting an XSP bot.

On XSP a single-leg entry (a naked or long put or call, or either leg of a short strangle) is not placed when the price it would trade at, the bid on a sale or the ask on a purchase, is under $0.03. The skip reads XSP option price below the 0.03 minimum for single-leg entries, and the bot keeps trying inside its window. Spreads and other multi-leg entries have no such floor.

type

Required·no default

The position type, and the execution contract:

typeExecution
PutCreditSpread / CallCreditSpreadOne atomic combo order
PutDebitSpread / CallDebitSpreadOne atomic combo order
IronCondorOne atomic 4-leg combo
Put / Call (naked short)Single leg (sell)
LongPut / LongCallSingle leg (buy)
ShortStrangleTwo independent naked singles

Spreads are never legged.

Experimental: Calendar and Diagonal: cross-expiry combos (sell the near minDTE leg, buy the far farDTE leg; Diagonal picks the far strike by farDelta). The net is usually a debit (a Diagonal can open for a credit). v1 monitoring is the delta stop on the near short, beforeExpirationTime, lossITM (credit only) and a manual close. Value-based exits (profitTarget, profitTargetScales, trailing, lossPercent, lossValue, maxStopValue, breakevenAt) do not apply to either, before or after a restart: the net debit (or credit) it opened for is the basis its realized result is booked against, not a basis for a value exit (see Position types). right: put or right: call is required (see farDTE below). Example-only for now; contact support before using either live.

days

Optional·[default: every trading day]

Weekdays the bot trades: 0 Mon, 1 Tue, 2 Wed, 3 Thu, 4 Fri. Names work too ([Monday, Wed]). Leave the key out to trade every day; there is no "all" value, and 0 means Monday.

A misspelled day ([Mondey]) refuses that one bot rather than guessing at what you meant. Your other bots are unaffected.

disabled

Optional·[default: false]

Skip this bot (also runtime /disable <bot>; the disabled set persists across restarts).

Every bot in the file counts toward your plan's bot limit, whether it is on, switched off (disabled, enabled: false, the dashboard switch or /disable) or parked. Switching a bot off does not free its place: only taking it out of the file does. If it still holds a position, park it first and remove it once that position has closed (see park below).

enabled

Optional·[default: unset]

Switch this bot on (true) or off (false) when the engine next starts: the same switch as the dashboard's Bots panel and /enable / /disable. It is applied when the value is new or changed, so after that the dashboard switch is yours to move: a bot you turn off on the dashboard stays off until you change enabled: in the file. Leave it out and the switch alone decides. A new bot with enabled: true starts on even when autoEnableNewBots is off.

park

Optional·[default: false]

Stop this bot opening new positions while keeping everything it already holds under management. A parked bot stays loaded: an open position is still adopted at restart, still monitored, still closes at its clock exit and can still be closed by hand, and the bot keeps its row in the dashboard (icon "Parked"). Its entry time is skipped with ENTRY_SKIP reason=parked.

Use park: true to retire a bot that has a position on. Do not comment the bot out of the file for that: a bot with no spec has no monitor and no exit, so the position it still holds rides unwatched until it expires. parked (parked: true) is accepted as a spelling of the same key. The start-of-day "Bots: n/m enabled" line and the dashboard's Enabled/Idle counts still include a parked bot, because it is loaded and not disabled; the boot record's CONFIG_ACTIVE.bots_parked is the count to subtract.

A bot the dashboard would refuse to save does not trade. At start-up the engine checks every bot with the same rules the dashboard's save check uses. A bot that breaks one, such as an openOrderAlgo name it does not know, an entryFilter or sizeFactor that cannot be evaluated, no openTime, a delta written as a percent, or a second bot with the same name (the later one), is refused: it is loaded exactly like a parked bot, so anything it holds is still managed, but its entry time is skipped with ENTRY_SKIP reason=refused, and the start-up record carries one BOT_REFUSED row naming the bot, the rule and the value (CONFIG_ACTIVE.bots_refused counts them). You see it on the dashboard too: the Activity feed has a Bot Not Accepted row with the rule and the reason, and the bot's row in the Bots table reads “Not accepted” and names the rule. The rest of the file trades normally.

A file the engine cannot read at all is a different case, and it waits instead of crashing. If the file is not valid YAML there are no bots to refuse, so the engine does not start: it writes one CONFIG_LOAD_FAILED record naming the file and the error, alerts you, and then waits. Fix the file, or make another config active, and it starts on its own. No restart, and no run of failed start-ups.

This only happens to a file that reached the engine without passing the dashboard (edited on disk or copied in). Problems with the file as a whole (a secret written into it, a missing strategy: tag) still block a save, but refuse nothing at start-up: they are logged once as CONFIG_FILE_WARNING, shown on the Activity feed as Configuration Warning.

openTime

Required·no default

The time of day the bot tries to open, in exchange time ("09:35" or "09:35:00"). Everything else about entry timing is measured from here.

Quote your times. openTime: 10:30:00 without quotes is not a time: YAML reads it as the number 37800, and the bot is refused at start-up. Write openTime: "10:30:00". The same applies to latestEntryTime and to any time under notifications.schedule.

openTimeWindow

Optional·[default: not set]

How long after openTime the bot may still open, written as a duration: "10m", "90s", "1h" or "1h30m". A duration TradeMint cannot read ("90min") is refused when you save. Without it a missed fire time is simply a miss.

latestEntryTime

Optional·[default: not set]

A hard cutoff, as a clock time rather than a duration. It wins over openTimeWindow: the entry window closes at latestEntryTime if set, otherwise at openTime + openTimeWindow, otherwise at openTime itself.

entryJitter

Optional·[default: 0]

Randomize the first entry attempt by ±N seconds around openTime, clamped so it can never fall outside the entry window. 0 fires exactly on openTime. Written entryJitterSecs before 2026-08-15 and that spelling still works.

openOrderAlgo

Optional·[default: Normal]

How the entry order is worked: Normal (6s between adjustments), Fast (3s) or Slow (15s). See Order Algorithms above for how they differ. openOrderTimeout caps how long the order works regardless of which you pick; the cancel and its confirmation take about 12 seconds more.

Relative is accepted but cannot be honoured on an entry and falls back to Normal, which the engine says on load. Every entry is a single multi-leg combo and IBKR refuses a pegged order on a combo (error 387). Market is exits-only for the same reason. A combo set to Market goes out as one fixed limit order, and a single-leg entry set to it works as Normal; neither is ever sent at market. Every entry algo, Slow, Hold and the Adaptive ones included, prices a single-leg entry patiently, without crossing.

entryFilter

Optional·[default: no filter]

Boolean expression of named filters and market-data values, JS syntax (&& || ! and comparisons): PostFOMCFilter() && CPIFilter(), vix() < 20 && FOMCFilter(), spx() > 6000 || vix1d() > vix9d().

A bare YAML boolean is honored directly: entryFilter: false means the bot never opens; entryFilter: true (or omitted) means no filter. Quoted "true"/"false" behave the same.

Market-data values (spx(), es(), vix(), vix9d(), vix1d()) are the latest reading from the index-quotes feed (refreshed every 2 seconds). Fail-safe: if a referenced value is missing or older than 120s the whole expression is false: the bot skips the entry and the skip shows on your Activity feed as a filtered skip, so a VIX-gated bot never enters blind, and the fail-safe can't be tricked by negation.

The expression is evaluated through a safe whitelisted parser (never raw code execution): only booleans, arithmetic (+ - * / % //), chained comparisons, and calls to the known filter and market names are allowed. Anything else fails safe to false, so the bot skips the entry rather than entering on a rule it could not evaluate: attribute access, subscripting, imports, comprehensions, or any runtime error such as division by zero or an unknown name.

A filter name TradeMint does not have (FOMCPlusOneFilter(), say) is refused when you save, with the real filter suggested where there is one. A bot saved with one before that check reads “Filter name not recognised” on your Activity feed and does not trade until you fix it in Configuration.

Entry filters

Every filter you can name in an entryFilter (and in sizeFactor). Each one returns true = this bot may enter, false = skip this bot for now. They compose with &&, || and !.

A filter that reads a feed makes the whole entry filter false when that feed is unavailable. False means skip, so an outage at the data provider pauses the bots gated on it rather than letting them enter blind. That is deliberate, and it is the most important thing to understand before gating a bot on a feed: entryFilter: "PostFOMCFilter()" will stop entering if the calendar feed is down, even on an ordinary day. It holds through ! and || too: !FOMCFilter() (trade only on FOMC days) also skips while the calendar feed is down, rather than reading the outage as an FOMC day. Bots you want to run unconditionally should carry no feed filter at all.

Calendar filters

Driven by a macro-calendar feed refreshed every 30 minutes. Each is independent, so you gate on exactly what you mean.

config.yaml
bots: - name: SPX Put Credit Spread 9:31AM template: 0DTE openTime: "09:31:00" entryFilter: "CPIFilter()" # Enter on any day except a CPI print - name: SPX Put Credit Spread 9:32AM template: 0DTE openTime: "09:32:00" entryFilter: "OpexFilter() && CPIFilter()" # Enter unless it is OPEX or a CPI print - name: SPX Call Credit Spread 2:00PM template: 0DTE openTime: "14:00:00" entryFilter: "EoQFilter() && PostFOMCFilter()" # Enter unless it is quarter-end or the day after FOMC

Weekday filters

These read the clock, not a feed, so they never fail-safe to skip.

config.yaml
entryFilter: "WednesdayFilter()" # Enter only on Wednesdays entryFilter: "MondayFilter() || FridayFilter()" # Enter only on Mondays and Fridays entryFilter: "!FridayFilter()" # Enter on any day except Friday

Random filter

randomFilter(p) passes at random, with chance p from 0 to 1. While a bot waits in its entry window the draw is made again every 10 seconds, so randomFilter(0.3) mostly delays the entry to a random moment in the window rather than skipping the day. A short window gives it fewer draws, and the bot may then not enter that day. randomFilter(0) never passes and randomFilter(1) always does; a p outside 0 to 1 is an error, and the bot skips.

config.yaml
entryFilter: "PostFOMCFilter() && randomFilter(0.3)" # enter at a random moment in the window

Market-data values

Numbers, not gates; compare them yourself. Published every 2 seconds: vix(), vix9d(), vix1d(), spx(), es().

If a referenced value is missing or older than 120 seconds, the whole expression is false and the bot skips, and the skip shows on your Activity feed. A VIX-gated bot never enters blind.
config.yaml
entryFilter: "vix() < 20" # Enter only when VIX is below 20 entryFilter: "vix1d() > vix9d()" # Enter only when 1-day VIX is above 9-day VIX entryFilter: "PostFOMCFilter() && CPIFilter() && vix() < 22"

Feed freshness

today() and tomorrow() are true when that calendar feed's last fetch succeeded: freshness only, never the contents. Every calendar filter already fails safe on its own, so this is only needed to be explicit: today() && CPIFilter().

sizeFactor

Optional·[default: not set (feature off)]

A sizing modifier: the same expression language as entryFilter, but returning a number that scales this bot's entry size. Where entryFilter answers "trade or skip?", sizeFactor answers "how much of the normal size?", so a bot can trade smaller under a condition instead of skipping outright:

config.yaml
sizeFactor: "1 - 0.5*MondayFilter()" # half size on Mondays, full size otherwise sizeFactor: "0.5 + 0.5*(vix() < 20)" # half size unless VIX is calm

Filters return 1/0 in arithmetic, so 1 - 0.5*SomeFilter() reads "reduce by half when the filter is on". Rules:

Every scaled entry logs a SIZE_FACTOR event with the factor and the before/after quantity, so the effect is always visible in the Activity feed. Omitted = full size (1.0).

maxDailyEntries

Optional·[default: not set (one entry a day)]

How many times a day this bot may enter. Within one run of the engine a bot works its entry window once: a fill ends its attempts for the day, whatever this is set to. The count matters after a restart inside the window (a crash, a Save and Restart, an update): today's entries are counted from your trade history, and a bot that has reached its cap is skipped (ENTRY_SKIP reason=maxDailyEntries).

Unset, a bot enters once a day. A bot that already entered today is skipped after a restart (ENTRY_SKIP reason=already_entered_today) instead of opening a second lot. Set maxDailyEntries: 2 (or more) if you want a restart inside the window to be able to open another one. A doubleUpBeforeExpiration copy is a bot of its own and keeps its own entry count.

Write a whole number. A negative number, a fraction or a yes/no is refused by the config check, and that bot does not run until it is fixed.

disableOnOpen

Optional·[default: false]

One-shot self-disable: after this bot’s first real fill, it switches itself off, the same switch as the dashboard toggle. It stays off on later days too, until you switch it back on (the dashboard toggle or /enable in Telegram): a new session does not turn it back on. An attempt that does not fill leaves it on. Use it for a bot you want to fire once and then stop, without editing the config mid-session.

A doubleUpBeforeExpiration copy follows the switch of the bot it copies, so once this bot has filled and switched itself off, its [stack] copy does not fire either.

crossOnFinalRetry

Optional·[default: false]

On the final attempt of the entry window, price the whole attempt to cross: every rung goes out at the marketable price (the short sold at its bid, the wing bought at its ask) instead of walking from the mid. Every earlier attempt still works for the full credit. The final attempt is the one with no time left after it for another; a bot with no retry interval makes a single attempt, so with this on that attempt crosses from its first rung. Trades a worse price for a higher fill rate; leave it off if a missed entry is cheaper to you than a bad one.

It applies to PutCreditSpread and CallCreditSpread only. On any other type it is ignored, and the config check warns when you save it there: an iron condor, a debit spread, a calendar and a diagonal already go out at the marketable price, and a naked or long put or call and a short strangle keep their usual entry pricing.

nlvOverride

Optional·[default: not set (uses the account's real NLV)]

Size this bot against a stated account value instead of the broker's. Useful when you are running one strategy against a notional slice of the account rather than all of it.

doubleUpBeforeExpiration

Optional·[default: not set (feature off)]

Adds a second copy of this bot that enters a set time before the close, on top of whatever the bot itself does. Write the time as a duration ("10m", "90s", "1h", "1h30m"): doubleUpBeforeExpiration: "20m" fires the copy at 15:40.

Sizing

Pick one. These are three ways of answering the same question (how big), and a bot carries exactly one. Two on the same bot, counting one it takes from its template, refuse that bot, at save and at start-up, and the message names where each one came from. To size a bot by its own key, cancel the template's with null (for example quantity: null beside the bot's bpu). Set none and every entry is one contract; the config check flags it so the default is a decision rather than an accident.

quantity

Optional·[default: 1]

Fixed contract count.

leverage

Optional·[default: not set (feature off)]

round(leverage × NLV / notional) contracts.

bpu

Optional·[default: not set (feature off)]

floor(bpu × NLV / risk per contract) contracts: a fraction of your buying power, between 0 and 1 (0.05 is 5%). A value above 1, or one written in quotes, is refused by the config check. The risk per contract depends on the type:

Below one contract, no trade (leverage, and bpu on a credit position): when the setting comes to less than one contract for your account's size, the entry is skipped and you get one notice for it. It used to trade one contract anyway, more than the setting allowed. A debit position's bpu still has a 1-lot floor: a budget too small for one contract trades one, and your record says so (events.csv in the Export under Settings → Account).

Credit / debit targeting

targetDelta

Optional·[default: not set; pick a selection mode: this, or targetPercentOTM / targetPointsOTM]

Select the short strike nearest this model delta (0.20 → ~20Δ).

One selection mode per bot. Exactly one of targetDelta, targetPercentOTM, targetPointsOTM, targetCredit and targetDebit picks the short strike. A bot with none, or with two (counting one it takes from its template), is refused, at save and at start-up. To move a bot off its template's mode, cancel the template's key with null (for example targetDelta: null beside the bot's targetPointsOTM).

How delta is calculated. TradeMint computes the delta it selects on itself, with a Vollib (Black-Scholes) model at its own index price. The model's volatility input is the implied volatility Interactive Brokers reports for each option; when IBKR has no volatility for a strike, that strike's delta is IBKR's own model delta instead. So the pick still depends on IBKR's option data: when IBKR's model Greeks are missing or stale (a degraded options data feed), a strike can drop out of the search or the pick can shift. Because the delta is TradeMint's own calculation, a strike chosen here can sit slightly away from one picked off the TWS delta column. The search reads only the size of the delta, so -0.20 and 0.20 choose the same put. The sign matters for the stop: see deltaOffset.

This is about choosing a strike. Once a position is open the stop decides on IBKR's streamed delta by default (the number TWS shows you), with the Vollib model running alongside it.

targetDeltaThreshold

Optional·[default: 0.25]

Reject the pick when |actual − target| exceeds the band. A fraction of the target delta (default 0.25 when absent → a 15Δ target accepts 11.25–18.75Δ). If no strike on the board falls inside the band, the bot skips that entry rather than selling something it was not asked to sell.

Because the band is a fraction, it narrows in absolute terms as the target delta shrinks: at a 0.12 target the default gives ±0.03, which can be narrower than the gap between neighbouring strikes. If a bot skips entries with “no acceptable strike”, widen this: a value of 0.42 on a 0.12 target gives a ±0.05 band.

Deprecated: targetDeltaThresholdAbs set the band as a flat number of delta points instead of a fraction. It is still read, and is converted automatically (a flat 0.05 on a 0.12 target becomes 0.4167), but it logs a warning naming the replacement value and will stop being read. Use targetDeltaThreshold. When a bot ends up with both keys, targetDeltaThresholdAbs wins, even when it comes from a template and the bot sets targetDeltaThreshold itself; the config check warns about it by name. Remove the deprecated key to use targetDeltaThreshold.

targetPercentOTM

Optional·[default: not set]

Select the short strike a percentage of spot out of the money: 0.01 is 1%, so about 60 points with SPX near 6,000. Scales with the index, which is usually what you want if the rule is meant to mean the same thing at 4,000 and 6,000. Written targetOTM before 2026-08-16 and that spelling still works. On an iron condor each side is picked this far out on its own: 0.005 sells the put 0.5% below spot and the call 0.5% above it.

targetPointsOTM

Optional·[default: not set]

Select the short strike a fixed number of index points out of the money: 60 is 60 points, whatever spot is. Use this when the distance is the point; use targetPercentOTM when the proportion is.

The strike lands on the nearest listed strike (SPX lists in 5-point steps), and an iron condor picks each side from its own spot reading. A target under half a step therefore puts both shorts on the two strikes bracketing spot, or on the same strike, if spot moves between the two picks. condorMinWindow is the guard for that.

condorMinWindow

Optional·IronCondor only·[default: two strike steps: 10 on SPX, 2 on XSP]

The smallest distance, in index points, allowed between an iron condor's short call and short put: its profit window. Unset, it is two of the symbol's strike steps, in that symbol's own points: 10 on SPX, 2 on XSP (one tenth of SPX, with 1-point strikes). A condor whose window is below this is not opened; one whose short call is at or below its short put is never opened whatever this is set to. The refusal ends the attempt as an ENTRY_SKIP with reason ic_window (the operator's engine log also records the two strikes, the window, the floor and spot). On 2026-09-08 eleven condors with targetPointsOTM between 2.5 and 4.75 opened with a 5-point window inside a 10-point width, and one with both shorts at 7695; all eleven settled at max loss. Set it to the width of the move you expect the index to make while the condor is open.

condorMaxShortDelta

Optional·IronCondor only·[default: not set (feature off)]

The largest delta, as a magnitude, you will sell an iron condor's shorts at. A condor whose short put and short call are both past this is not opened; the refusal ends the attempt as an ENTRY_SKIP with reason ic_window, the same skip condorMinWindow produces (the skip's reason names both shorts' deltas and the value they were compared against).

This is the other half of the 2026-09-08 lesson. Eleven condors opened that day at a 10-point window the window guard had nothing to say about, every one of them carrying a delta between 0.35 and 0.47 on both sides: shorts that close to the money on an index that then moved. The eight that filled settled at 8.02 against a credit of about 4.65.

There is no default, deliberately. How close to the money you sell is your strategy, not something the engine should decide for you, so this does nothing at all until you name a number.

Three details worth knowing:

minPremium

Optional·[default: not set]

Reject the selected contract when its extrinsic value (mid − intrinsic) is below this floor; the position is simply not opened. The picker does not step toward ATM to satisfy it. On a spread the floor applies to the net extrinsic: the short's extrinsic less the long wing's. On an iron condor each side is checked that way on its own.

targetCredit

Optional·[default: not set (feature off)]

Select the short strike by its premium, for credit positions (the credit types and naked singles). You are naming what you want to be paid and letting the strike follow. Walking out from the money, the bot takes the first strike whose mid is at or below your target, so it never sells for more than you named; if every strike pays more, it takes the cheapest one. The price compared is the short strike's own mid, not a spread's net credit. On a short strangle it applies per leg, and on an iron condor per side: each short is picked at the target on its own, so targetCredit: 1.50 on a condor looks for a put short and a call short paying about 1.50 each, not 1.50 for the whole condor.

targetDebit

Optional·[default: not set (feature off)]

The same idea on the other side: select the primary long of a debit position (a long put or call, or a debit spread) by the premium you are willing to pay. The same rule picks it: the first strike, walking out from the money, whose mid is at or below the target, else the cheapest. On a debit spread the price compared is the bought leg's mid, not the net debit of the spread.

minDTE

Optional·[default: 0]

The expiry the bot trades, counted in trading days: 0 is today's, the 0DTE chain this engine is built around, and 1 is the next trading day's. Weekends and market holidays are skipped.

Only a Calendar or Diagonal may set it above 0 (there it places the near leg). Every other type is refused with a minDTE above 0, at save and at start-up. A put or call credit spread carried to a later expiry is not yet available: carrying one to its own expiry day is being proven before it is offered. The other types are watched only through the session that opens them, so a position on a later expiry would have no stop, profit target or exit on the day it expires.

maxDTE

Optional·[default: 0]

Accepted, but not used by the engine today. A bot trades the one expiry minDTE selects; it does not reach further out when that chain has nothing that fits, whatever this is set to. Leave it at 0: the config check warns on a maxDTE above minDTE, since that asks for a reach the engine does not make, and the bot goes on trading the expiry minDTE selects.

farDTE / farDelta (Calendar/Diagonal, experimental)

Optional·[default: farDTE 5, farDelta the bot's targetDelta]

The far (long) leg's expiry, counted in trading days like minDTE (weekends and market holidays are skipped), and (Diagonal only) its target delta. Unset, farDTE is 5 trading days. It must be later than the short's expiry (minDTE, or today when minDTE is unset), so farDTE: 0 is refused, and it can be at most 10 trading days (about two weeks): the config check refuses a larger value, because 10 trading days is the longest TradeMint keeps watching a far leg it carries from one session to the next.

Only targetDelta picks a calendar's or diagonal's near strike, so it is required (the config check refuses the bot without it). targetPointsOTM, targetPercentOTM, targetCredit and targetDebit do not pick it, and setting one beside targetDelta is a second selection mode, which refuses the bot too. A calendar buys the far leg at the near strike; a diagonal picks it by farDelta.

right (put or call) sets which side a calendar or diagonal trades, and it is required: the config check refuses a calendar or diagonal without it, or with any other value. The bot's name never decides the side.

Spreads

config.yaml
spread: width: 100 # max wing distance (points) price: 0.05 # walk-down target (optional) # percent: 0.014 # alternative: wing distance as a fraction of spot

On an iron condor these keys pick each side's wing on its own: the put wing below the short put and the call wing above the short call, each by the same rule, so price: 0.05 buys a wing near 5¢ on both sides.

width

Required·spreads only·no default

Maximum wing distance in points. With no price, the wing snaps to the nearest listed strike at short ± width (narrowing inward only if the full-width wing has no live quote).

With price, target the long-leg cost: walk outward from the short to the nearest strike whose long ask ≤ price that also has a live bid (a real two-sided wing; a strike with no live quote is never bought). Because the ask decays as you go further OTM, the nearest ≤ price strike is the ~price crossover, so the wing tightens inward late-day: this is "width AND price": buy the ~5¢ long, capped at width. If no two-sided wing reaches price within width, fall back to the width cap (the nearest quoted wing at short ± width); a bid-less cheap strike sits wider rather than being bought unsellable.

percent

Optional·[default: width is used instead]

Wing distance as a fraction of spot. When set it replaces width as the wing distance, but width is still required: the config check refuses a spread without one, and the margin cushion and bpu sizing still measure the spread's risk by width.

delta

Optional·[default: not set (feature off)]

Pick the wing at this target delta (e.g. 0.05 = the ~5Δ strike), capped at width. Takes precedence over price when both are set; falls back to the price walk-down if no in-band strike has a usable delta and quote.

Stops

The stop: block. A bot may carry several of these at once, and whichever condition is met first closes the position. They are grouped below by what they measure: what the spread is worth, then where the delta sits, then timing and mechanics.

Every number in the block is written as a plain number, not in quotes. The config check refuses "0.10" or a yes/no where a number belongs, and a value outside the range its setting takes, and the bot does not run until it is fixed. Two out-of-range values save with a warning instead, and their own entries say what then happens: lossITM above 1, and a closeWindowFloorSecs above its ceiling or below 0.

The settings in this section are read only inside stop:, except condorStops, which may also sit at the bot's top level, and secondary, which belongs at the top level. Any other one written at the bot's or template's top level, beside stop: instead of inside it, is refused by the config check, which names the block to move it into; gracePeriodMs and hardGracePeriodMs there are flagged instead, and the bot uses the file-wide default.

lossPercent

Optional·[default: not set (feature off)]

Close when the spread itself is worth a multiple of the credit you took in: 2.0 means the spread has doubled against you. The measurement is the spread's own value at the mid (the legs' mids netted: on a spread, the short's less the long's), not the underlying and not the last trade: the stop does not wait for a trade to print at your level. On a short strangle it is the combined value of both shorts against the combined credit, and the same goes for lossValue, maxStopValue, breakevenAt and the trailing stop. On a credit position the value must be above 1: the position is worth about its credit when it fills, so 1 or less (or 0.5 read as "a 50% loss") would close it at once, and the config check refuses it.

On a long put or call, or a debit spread, it is a floor on what you paid: the position closes when its value falls to that fraction of the debit, so 0.5 sells it at half the debit. A credit-style value of 1 or more is at or above what the position is worth when it opens, so it would close the position at once: the config check refuses it, and the value must be below 1.

lossValue

Optional·[default: not set (feature off)]

The same measurement as lossPercent, the spread's mid, in a different unit: a flat dollar value for the spread rather than a multiple of the credit. On a long put or call, or a debit spread, it is a floor too: the position closes when its value falls to this price. The config check warns that it is a floor, or that it closes the position at once when it is at or above the spread's width or the bot's targetDebit.

Set one or the other. On a credit spread, a short strangle, an iron condor and a debit spread the two share a single grace timer; on a single option (a naked or long put or call) each keeps its own.

lossITM

Optional·[default: not set (feature off)]

A different measurement: how far the underlying's last price has moved through your short strike, as a fraction of the strike, not points, and not a fraction of the index (0.005 = 0.5% in the money). A put short stops when the last price is at or below strike × (1 − lossITM); a call short, at or above strike × (1 + lossITM). For example, lossITM: 0.005 on a 3950P stops when the index trades below 3930.25 (3950 × 0.995) and stays there for gracePeriodMs. SPX at 5,000: 0.002 on a 5000P stops at 4,990, 10 points in the money. Typing 10 here means 1,000% and never fires: the config check warns about anything above 1, and saves it. It reads the index's last print, never the prior close, and not the spread quote, so it is the one stop here that still fires when the spread has no usable quote.

It applies to credit positions only: credit spreads, a naked short put or call, a short strangle and an iron condor. On a strangle or a whole-mode condor (condorStops: whole, the default) either short reaching it closes the entire position; with condorStops: independent each side is checked against its own short strike and closes only itself (a lossITM inside stop.put / stop.call overrides the bot-level one for that side). On a debit position (a debit spread, a long put or call, a calendar, or a diagonal opened for a debit) it is ignored, and the config check warns when you save it.

All three loss stops are graced like the delta stop: a breach must persist through gracePeriodMs before the close fires. Each keeps its own timer, so a value breach and an ITM breach never add up.

breakevenAt

Optional·[default: not set (feature off)]

A breakeven lock, as a fraction of the credit. Once the trade has captured that much of it (0.5 = half the credit), the lock arms; if the spread's value then climbs back to the full credit, which is P&L back to zero, the position closes there. A winner can give back its gains but cannot turn into a loser through this rule. An armed lock stays armed when TradeMint restarts, and when it picks a position back up automatically after an internal error. Unlike the three loss stops above, it is not graced: it fires on the first reading at the credit.

On a long put or call, or a debit spread, it is the same lock on what you paid: it arms once the position has gained that fraction of the debit (0.5 = worth 1.5 times what you paid) and closes if the value falls back to the debit.

maxStopValue

Optional·[default: not set (feature off)]

A hard ceiling on what buying the spread back may cost, in the same units as lossValue: the spread's quoted price (4.0 closes it once the buy-back reaches 4.00). It exists for the moment a quote gaps so far that a graced stop would wait through a price you would never accept, so it is not graced: it fires on the first reading at or above the ceiling.

It applies to positions you buy back to close: credit spreads, iron condors, short strangles and naked puts and calls. A long put or call and a debit spread are sold to close, so they ignore it.

closeWindowFloorSecs

Optional·[default: 60 (the platform ceiling)]

How much of the session must remain for a close to be worth working. Inside the floor TradeMint stops walking a limit ladder and buys the short back with a market order straight away: a buy-back set up in the last minute may not reach its own market fallback before the bell, and an order that never reaches the book leaves the short to cash-settle. Selling a long leg is not hurried the same way: a long sale goes to market first only inside the last 30 seconds (or inside your floor, if you set it lower), because a long the bell beats settles at its own value. The one exception is an iron condor that closes both sides together: its first side's long is sold at market inside the floor, so the second side's buy-back is not held up behind it. On an early-close day the floor counts back from the 1:00 p.m. ET close.

stop:
  closeWindowFloorSecs: 10   # work limits until 15:59:50, then go to market

The platform value is both the default and the ceiling: you can lower it (take the limit ladder closer to the bell and accept the risk) but not raise it past what the engine will stand behind. A value above the ceiling is clamped, a negative one is read as the platform value, and the config check says so. 0 turns the floor off.

The last ten seconds. A buy-back set up in the last 10 seconds of the session does not reach the book in time, so TradeMint does not send one. When a close of a short with a long wing beside it (a credit spread, a side of an iron condor, or a diagonal) is due that late and the short expires at this close, the position is carried to settlement on purpose instead: the wing caps what it can lose at the distance between the two strikes. A short with no wing (a naked put or call, a strangle) is never carried: its buy-back is always sent. The 10 seconds follow your floor down: a closeWindowFloorSecs below 10 lowers it to your value, and 0 turns it off.

One consequence to know about: a bot whose openTime falls inside the last 30 seconds of the session can only ever open positions with no closable window left, so the config check refuses that bot by name instead of letting it fill and then abandon. That means an openTime at or after 15:59:30; a floor you set below 30 moves that line to your own floor, and a higher floor does not move it.

delta

Optional·[default: not set (feature off)]

An absolute soft stop: close when the short's delta reaches this level, whatever the bot entered at. deltaOffset is the relative form of the same stop; this one names the level outright, so a bot whose entry delta drifts still stops in the same place. Signed like the strike: puts negative, calls positive.

If both are set, delta wins: the absolute level is read first. That holds across a template too: a delta your template sets beats the deltaOffset your bot writes, and the config check warns when it does. To use the offset on that bot, add delta: null under its stop: (Normal mode does this for you). hardDelta and hardDeltaOffset work the same way.

stop:
  delta: -0.45        # close when the short put reaches 45Δ, regardless of entry
  hardDelta: -0.55    # the gap backstop, also absolute

hardDelta

Optional·[default: not set (feature off)]

The absolute form of hardDeltaOffset: the gap backstop for a move that jumps past the soft level between polls. Wins over hardDeltaOffset when both are set.

deltaOffset

Optional·[default: not set (feature off)]

The acting delta stop (where the stop fires), as a distance past the delta your short had when the trade opened: stop_soft = |entry delta| + |deltaOffset|. Example: a short that opened at 20Δ with 0.25 stops at 45Δ. Because the stop is counted from where the short actually filled, a pick a little closer to the money than targetDelta asked for still gets the full 0.25 of room. The offset only ever moves the stop further in the money, whichever way it is signed, so the pick can never already be past its own stop.

This works the same on every type that has a delta stop. Strikes picked by targetCredit, targetPointsOTM, targetOTM or targetPercentOTM use the same rule. On an iron condor each side uses its own short's entry delta and its own block, stop.put / stop.call (see condorStops). A short strangle has one delta level, taken from the smaller of its two shorts' entry deltas, so both sides share the earlier stop; stop.put and stop.call are not used on a strangle. Side blocks belong to an iron condor only: on any other type the config check refuses them, and the bot does not run until the keys are written directly under stop. If the entry delta could not be read, a bot with targetDelta stops at |targetDelta| + |deltaOffset| on its targetDelta's side instead (targetDelta: -0.20 with deltaOffset 0.25 or -0.25 stops at 45Δ) and the Activity feed says so (Delta Stop From Plan); a bot without targetDelta gets no delta stop for that trade and the Activity feed says why (No Delta Stop); the trade's other exits still apply.

Deltas are fractions. deltaOffset, hardDeltaOffset, delta and hardDelta take a value between -1 and 1: 0.40, not 40. A value outside that range is refused by the config check, which suggests the fraction you meant.

Which entry delta: on a credit spread it is the short's delta when the order filled, or its delta when the strike was picked if the fill's could not be read. An iron condor, a strangle and a naked short use the delta from when each strike was picked. hardDeltaOffset works the same way.

To measure the offset from targetDelta instead, set deltaBasis: target.

deltaBasis

Optional·[default: fill]

What deltaOffset and hardDeltaOffset count from. fill (the default) is the delta your short had when the trade opened, as described above. target adds the offset to targetDelta exactly as written, wherever the pick landed, and the stop then compares sizes, so the offset needs the same sign as targetDelta. targetDelta: -0.20 with deltaOffset: -0.25 stops at 45Δ. With deltaOffset: 0.25 the stop sits at 5Δ, inside the entry delta. Those levels are the short's delta, which is what deltaCheck: primary reads. Under deltaCheck: all, the default on a spread, the level then moves to the net as every offset does (see deltaCheck): the wing's delta at entry is subtracted, so with the wing at 5Δ the 45Δ bot stops when the net reaches 0.40, and the level moves with where the wing landed. Set deltaCheck: primary as well to stop on the short at 45Δ. An iron condor's stop.put / stop.call blocks and a Calendar or Diagonal default to primary, so there the level stays on the short unless deltaCheck: all is set. With target, a pick already at or past its stop is refused at entry on a credit spread, an iron condor or a naked put or call (ENTRY_SKIP reason=stop_band); a short strangle opens, is breached from the first reading and closes once its grace period runs out. An iron condor's stop.put / stop.call blocks follow their side: put negative, call positive. target needs targetDelta: a bot without it always measures from the entry delta. Set it at the bot level; it applies to an iron condor's side blocks too. Any value other than fill or target is refused by the config check.

stop:
  deltaOffset: -0.25
  deltaBasis: target   # stop at targetDelta - 0.25, not 0.25 past where the short opened

hardDeltaOffset

Optional·[default: not set (feature off)]

stop_hard = |entry delta| + |hardDeltaOffset|: the gap backstop for a move that jumps past soft between polls. It is counted the same way as deltaOffset, including deltaBasis.

deltaCheck

Optional·[default: all]

What the delta stop measures. all (default) is the position's net delta: the short leg's delta less the long leg's, signed, because you are short one and long the other. primary is the short leg's delta alone. A put credit spread with the short at -0.30 and the wing at -0.10 reads 0.20 under all and 0.30 under primary, so all trips later for the same stop level. The net peaks while the price is between the strikes, so on a narrow spread it may never reach a high level: there a loss stop (lossPercent, lossValue) is what closes the trade.

With deltaOffset / hardDeltaOffset, all sets the stop off the net delta at entry: a 20-delta short with a 5-delta wing and deltaOffset: 0.25 stops when the net reaches 0.20 - 0.05 + 0.25 = 0.40. Under primary the same bot stops when the SHORT reaches 45 delta, the arithmetic in Exiting positions. An absolute delta / hardDelta is compared to the net as written. If the long leg's delta at entry was not recorded, the offset is set off the short's entry delta and your record says so (events.csv in the Export under Settings → Account).

Set deltaCheck: primary to keep the short-leg stop: this was the default from 2026-07-29 until 2026-11-15, so a bot that relied on it should say so. A Calendar or Diagonal keeps a primary default (adding a far-expiry leg's delta to a near-short stop measures nothing useful) but honours an explicit value. An iron condor's sides keep a primary default too: an all across all four legs is not something per-side stops can read, so set it per side if you want it. A side set to all reads that side's net (its short less its own wing), and its offset is set off that side's net at entry, the same arithmetic as a spread's. Delta stops and deltaCheck do not apply to a long put or call or a debit spread: they have no short to stop on. Any value other than all or primary (short is read as primary) is refused by the config check, so a misspelling cannot quietly run the short-leg stop.

beforeExpirationTime

Optional·[default: not set (feature off)]

"15:30" or "15:30; 0.1": time-based exit, optionally skipped when |delta| exceeds the level. On a debit spread the skip reads the bought leg's delta. Write the time in quotes on a 24-hour clock, "15:30" (or "15:40:30" with seconds): unquoted, YAML reads 15:30 as a number, and the config check asks you to quote it. A time it cannot read ("3:30pm", "25:99") is refused, and the bot does not run until it is fixed. The time is read as written, exchange time, every day, except on an early-close day (below).

On a day the market closes early (13:00 ET), a time at or after that close keeps the same lead on the close: "15:30", 30 minutes before the usual 16:00, fires at 12:30, and no clock exit fires later than one minute before the early close. The config checks warn about this in the two weeks before an early close.

gracePeriodMs

Optional·[default: the file's stopGracePeriodMs (500ms when unset)]

How long a soft breach must persist before the close fires, so a single tick spike never stops a position. It graces every soft stop: deltaOffset, lossPercent, lossValue and lossITM. Any clean tick resets the countdown, so a breach that snaps back and returns serves the full grace again.

Set it inside the bot's stop: block. That is the only place it is read, apart from an iron condor's side blocks (stop.put / stop.call, in either condorStops mode), where it sets that side's grace (see condorStops):

bots:
  - name: My bot
    stop:
      deltaOffset: -0.25
      gracePeriodMs: 600      # confirm a soft breach for 600ms before closing
      hardGracePeriodMs: 200  # the hard stop gets its own, shorter, confirmation

A template's stop: merges into every bot that names it, so set it once on the template to cover a whole family.

Write a whole number of milliseconds. Inside a bot's stop:, a value that is not a number ("500ms") is refused by the config check, and the bot does not run until it is fixed: it does not fall back to the file-wide default.

stopGraceSecs is the same setting in seconds and still works, but it is deprecated; use gracePeriodMs. If both are set, gracePeriodMs wins. Putting either key beside stop: rather than inside it has no effect: the bot falls back to the file-wide default, the top-level stopGracePeriodMs (500ms when unset). The config check warns when you save it; the engine does not repeat it at start.

hardGracePeriodMs

Optional·[default: the file's hardDeltaStopGracePeriodMs (500ms when unset)]

The same confirmation delay for a hard breach (hardDeltaOffset). It runs its own timer, so a soft breach and a hard breach never add up. Same rules as above, with hardStopGraceSecs as the deprecated seconds form and the top-level hardDeltaStopGracePeriodMs as the file-wide default.

comboClose

Optional·[default: false]

Set true to close a credit spread as one combo order before the leg-by-leg close. When the stop or another exit closes the spread, the first attempt buys the spread back as a single order at the spread's ask plus one tick, and raises it toward the market every 3 seconds, at most 5 times. Whatever that order does not fill is closed leg by leg in the same attempt, as without this setting. It applies to a two-leg credit spread only, and is skipped (the close goes leg by leg) near the closing bell or when there is too little time for one step. It also needs secondary: close (the default): the combo order sells the long leg with the short, so with secondary: keep or trail every close stays leg by leg, and the config check warns that comboClose does nothing on that bot. Only true turns it on.

orderAlgo

Optional·[default: Fast]

The exit chase style (see Order algorithms). On an iron condor a side block (stop.put / stop.call) may set its own, for that side's close, in either condorStops mode; unset, the side uses the bot's.

condorStops

Optional·IronCondor only·[default: whole]

How an iron condor is managed after its atomic 4-leg fill.

whole (default): one monitor watches all four legs, and any exit closes both spreads. The bot-level stop.lossPercent, stop.lossValue, stop.breakevenAt, stop.maxStopValue, stop.trailing (type profit or dollar), stop.beforeExpirationTime and stop.lossITM, and the bot's profitTarget, apply to the combined condor: its value is the cost to buy back all four legs, against the credit received for all four. So a lossValue or maxStopValue is a price for the whole condor, not for one side. Per-side delta stops go under stop.put / stop.call (each a normal stop block with its own signed deltaOffset: put negative, call positive; the sign can't be shared, so put and call are separate blocks), and either side reaching its stop closes the whole condor. Inside a side block, deltaCheck (all nets that side's long wing against its short's delta), gracePeriodMs / hardGracePeriodMs (how long that side's breach must last) and orderAlgo (how that side's close is worked) apply to that side alone; unset, they fall back to the bot's own values. A delta trailing stop and profitTargetScales are not used on an iron condor: it closes all four legs together.

A value exit written inside a side block is not a per-side exit in whole mode: it applies to the whole condor, graded on the combined four-leg value. lossPercent, lossValue, maxStopValue, lossITM and breakevenAt take the smallest value set at bot level or in either side block, so the one that fires first is the one used; beforeExpirationTime takes the earliest time (with that time's ; X skip); stop.trailing takes the bot's own, else the put side's, else the call side's.

If TradeMint restarts while only one side of a whole condor is still open, a close of the condor that the restart interrupted is finished. Otherwise the open side is watched on its own side block, with the same delta stops, deltaCheck, grace and orderAlgo as before, plus lossITM and the bot's beforeExpirationTime and closeWindowFloorSecs. The profit target and the value exits do not run on that half: the credit was recorded for all four legs, not per side.

independent: the put spread and call spread each get their own monitor; one side stopping buys back only its two legs while the other keeps running, and each side settles on its own. Each side is managed like its own credit spread: the bot-level stop.lossPercent, stop.lossValue, stop.maxStopValue, stop.breakevenAt, stop.lossITM, stop.beforeExpirationTime, stop.closeWindowFloorSecs, stop.trailing (any type) and stop.deltaCheck, and the bot's profitTarget, apply to each side separately, against that side's own credit. The same key written inside stop.put or stop.call overrides the bot-level one for that side, profitTarget included: put: {profitTarget: 0.6} closes the put side once it has kept 60% of its own credit, while the call side keeps the bot's profitTarget (a side's profitTarget is a fraction of that side's credit, between 0 and 1, and a null switches the target off for that side). As in whole mode, a side block's gracePeriodMs / hardGracePeriodMs and orderAlgo set that side's grace and close algo; unset, the bot's apply. Delta stops go only in the side blocks, with their signed offsets. A side's long wing always closes with its short: secondary does not apply to an independent condor. A side's loss exits (lossPercent, lossValue, maxStopValue, lossITM) count toward maxDailyStops the same as a whole condor's do.

What a side block takes, in either mode: delta, hardDelta, deltaOffset, hardDeltaOffset, deltaCheck, gracePeriodMs, hardGracePeriodMs, orderAlgo, lossITM, lossPercent, lossValue, breakevenAt, maxStopValue, beforeExpirationTime, trailing and closeWindowFloorSecs, plus profitTarget on an independent condor only (a whole condor's profit target is the bot's, on the combined credit). Each takes the same values as the bot-level key. The config check refuses anything else in a side block, a profitTarget in a whole condor's side block, and a value outside its range. A bot whose file already holds one (edited outside the dashboard, or saved before this check) does not trade until it is fixed: it is listed as not accepted, with the setting to change, and the other bots trade as usual.

A whole condor with none of these exits, or an independent condor with no exit on either side, is held to expiry. Accepts the key at bot level or nested under stop:. Any value other than whole or independent is refused by the config check, which suggests the nearer of the two.

config.yaml
type: IronCondor condorStops: independent targetDelta: 0.40 # 40Δ short each side (magnitude; applied to both wings) stop: put: {deltaOffset: -0.30, hardDeltaOffset: -0.35} call: {deltaOffset: 0.30, hardDeltaOffset: 0.35}

secondary

Optional·[default: close]

What happens to the LONG (the protective wing) after the short closes; a top-level bot key, a sibling of spread: and stop:. The short always closes first, single-leg at the touch (the risk leg comes off now; a combo close routes to the slower complex book). Unset ⇒ close.

One exception is a resting profit target (see resting): it is a single combined order for both legs, working at the exchange, so when it fills the short and the long close together, and secondary is not applied to that fill: a keep or trail long is sold with its short. The safety stop TradeMint places at IBKR while its own live prices are missing (Safety Stop (IBKR)) is the other: one order that closes every leg, so when it fills the long closes with its short whatever secondary is set to.

Write it as a scalar for the simple case, or as a one-key block where the mode is the key and its value is that mode's settings. Write the mode by name: a yes/no (secondary: off, false, true) is not a mode, and the config check refuses it when you save, because the engine reads false and off as keep, which holds the long you may have meant to sell. A file saved with one before this check keeps running as it did: true closes the long, false keeps it.

secondary: keep          # scalar: ride to expiry, no bounds

secondary:               # keep with bounds, basis = the long's value the moment it split off
  keep:
    profitTarget: 0.5    #   sell when value ≥ basis × (1 + 0.5)
    lossPercent: 0.5     #   sell when value ≤ basis × 0.5   (a floor)
    beforeExpirationTime: "15:20"   # sell whatever is left at 15:20 ET on the long's expiry day

secondary:               # trail: arms once the long has gained `trigger` (omit ⇒ arms immediately)
  trail:
    type: profit         #   profit | dollar | delta
    trigger: 0.25
    trail: 0.30
    beforeExpirationTime: "15:20"   # same clock exit, for a trailed long
    extendedHours: true             # opt in: decide the trail on pre-/post-market marks too (default: RTH only)

beforeExpirationTime under keep or trail is the kept long's own clock exit: "HH:MM" (or "HH:MM:SS"), exchange time, and it fires only on the long's expiry date: a calendar's far leg is held on purpose, so an earlier day never liquidates it. The sale runs on the bot's stop orderAlgo through the same guarded path as every other kept-long exit (LONG_EXIT{reason: long_before_expiration}). It is independent of the spread's beforeExpirationTime, which is the short's clock and does not apply to a long that has already split off. Without it a kept long rides to expiry unless a bound or the trail sells it first. This is the same for a calendar's or diagonal's far leg carried into a later session (still held when the engine next starts): only its own beforeExpirationTime under keep or trail sells it on the clock, never the spread's stop.beforeExpirationTime.

extendedHours under keep or trail (default off): a kept long's value exits (the profit target, the loss floor and the trail) are decided only inside NYSE RTH (09:30–16:00 ET on a trading day). The long is still marked pre-open and after the bell, but when an exit is due on an off-hours mark the engine places no order, records the deferral once in its tape, and re-decides at 09:30 on a live mark. Pre-market SPX option marks are wide and thin: a trail measured on them is measured on noise (2026-09-17: a carried long adopted at 06:59 ET trailed out at 07:00 ET, basis 12.20, filled 2.95). Set extendedHours: true to decide on those marks anyway. The clock exit above, a manual close and an orphan's salvage are not value decisions and are not gated. An adopted long (carried in from a prior session) seeds its trail peak from its first live in-session mark, not from its recorded basis.

salvageFloor (per bot or template, top level; default 0.05): the lowest bid a kept or orphaned long is sold at. When the clock exit, the trail, a bound or an orphan’s salvage calls for a sale and the long’s bid is below the floor, the engine places no order and the wing rides to expiry instead: the proceeds of a $0.01 wing do not cover its commission, and chasing it floods the book with unfillable orders. The engine records it once per long and does not retry. A manual close still sells at any bid. salvageFloor: 0 sells at any bid; a value that is not a price is ignored with a preflight warning and the default applies.

trail.type: measured off the long's debit (basis = its value the moment it split off):

A bare trail: 0.3 (or the scalar secondary: trail) ⇒ {type: profit, trigger: 0, trail: 0.3}. This is the same {type, trigger, trail} schema as the spread Trailing stop; only the reference differs (the long's debit here, the spread's credit there).

Orphan safety: if the short stops and the long can't be sold (no bid, or the close chase runs out of time) it is never abandoned; it becomes the same standalone #L tracked position and auto-sells the instant a bid at or above its salvageFloor appears (below it, the wing rides to expiry).

The same applies to a long put or call: if its close still has not filled after three tries, what is left becomes a standalone #L tracked position. It keeps its live value on the dashboard, you can still close it yourself, and it sells as soon as a bid at or above the bot’s salvageFloor appears; otherwise it expires.

Profit target

profitTarget

Optional·[default: not set (feature off)]

Fraction of max profit to harvest (0.9 = close at 90% captured). The legacy key profitTargetPercent is accepted as an alias (the modern profitTarget wins when both are set).

On a long put or call or a debit spread there is no credit to capture, so it is the gain on what you paid instead: the position closes once it is worth (1 + profitTarget) times its debit, so 0.5 closes at 1.5 times the debit and 1.0 once it has doubled. On these types any positive number is allowed: 3.0 is a 300% gain, closing at four times the debit. A debit spread is never worth more than its width, so when the bot sets targetDebit the config check warns if (1 + profitTarget) × that debit is above the width: that target can never be reached. Without targetDebit, a target of 1 or more is warned with the most you can pay for it to be reachable (the width divided by 1 + profitTarget). On a credit position the value stays between 0 and 1. Write it as a number: profitTarget: 50% is refused by the config check (write 0.5), and the bot does not run until it is fixed.

resting

Optional·[default: true]

Default true, for a credit spread. true parks a standing exchange limit at the target (pulled automatically when a stop fires or on /btc); false = the monitor polls and closes at the crossing. A bare-float profitTarget: 0.5 also rests. The resting close is one combined order for both legs, so when it fills the short and the long close together (secondary is not applied to that fill).

Only a credit spread rests. On every other type the profit target is always polled: the monitor watches the value and closes at the crossing, and resting has no effect. That covers an iron condor (either condorStops mode), a naked put or call, a short strangle, a long put or call and a debit spread.

When another bot needs the same contract. IBKR won't accept an order on an option that already has one of your orders working the opposite way. So when another of your bots opens, or a stop closes, on a contract where a resting profit target sits the other way, that profit target steps aside for the few seconds the other order needs, then goes back at the same price. While it is out, the target is still watched and closes at the crossing, as with resting: false.

After a restart. TradeMint cancels the resting profit target the previous run left at the exchange, then places it again at the same price, worked out from your actual fill, once IBKR confirms the old one is gone. Until then the target is watched and closes at the crossing. If an order of that trade from before the restart is still working, the target stays watched instead of resting, so two closing orders never work the same position. The same holds when TradeMint picks a position back up automatically after an internal error.

Turning it off. Write resting inside the map: profitTarget: {percent: 0.5, resting: false}. A separate resting: false line beside a bare profitTarget: 0.5 is not read, and the target still rests.

cancelClosingOrderOnLatestEntry

Optional·[default: false]

true pulls the bot's working resting profit target once the clock passes the bot's latestEntryTime. From then on the profit target is no longer working at the exchange. The key does nothing on a bot with no latestEntryTime, and nothing on a bot whose profit target does not rest (see resting).

profitTargetScales

Optional·[default: not set (feature off)]

Partial harvests on the way to the main target:

config.yaml
profitTarget: 0.9 profitTargetScales: - {at: 0.5, close: 0.5} # at 50% of max profit captured, close half the position

Credit spreads only. Scales are not applied to an iron condor (either mode), a naked or long put or call, a short strangle, a debit spread, a calendar or a diagonal.

at = capture fraction (0–1); close = fraction of the original quantity. Each scale attempts once, closes short-first through the normal confirmed path, and the remaining quantity keeps its full stop and profit-target monitoring. A scale that would take the whole remainder becomes a normal full close. Ignored while a resting profit-target order is working the exchange (the exchange holds the full quantity). If a partial close covers only some of its shorts, the covered count is credited, all remaining scales are disabled, and a loud alarm fires; a failed partial is never blindly retried. A rung the engine cannot use (an at that is not between 0 and 1, a close that is not above 0 and at most 1, or a missing one) is refused by the config check, and the bot does not run until it is fixed. Every harvest's proceeds are banked everywhere P&L shows (the dashboard, the positions table, the intraday curve, and Telegram summaries) and the final close applies to the remaining quantity. Newer feature: validate on paper before relying on it live.

After a restart. A position that has already taken some of its harvests carries on with what it still holds, fully managed: a harvest it already took is not taken again, and the ones still to come close the same fraction of the original quantity. If your account's fills don't confirm what the position still holds, TradeMint keeps watching it but won't close it automatically, and alerts you.

Trailing stop

A trailing stop on the spread, under stop:. Arms once the position gains trigger, then follows the peak and exits when it gives back trail; both units follow type, measured off the credit:

stop:
  trailing:
    type: profit       # profit | dollar | delta
    trigger: 0.30
    trail: 0.05

profit

arm at trigger captured (fraction of credit); exit on a trail give-back (fraction of credit) off peak profit. A give-back smaller than one price tick of the option (0.01 on XSP; 0.05 on SPX under $3) is raised to that tick; a trail of 0 still exits as soon as it arms.

dollar

arm at $trigger captured; exit on a $trail give-back off peak profit. The same one-tick minimum applies.

delta

arm when the delta the stop measures shrinks to trigger; exit when it grows back trail off its low. On a spread that is the delta deltaCheck names: the position's net delta (the short's less the wing's) under all, the default, or the short's |delta| alone under primary. A short at 0.12 delta with its wing at 0.03 reads 0.09, so trigger: 0.10 starts the trail under all and not under primary, and from there trail counts off the same reading. A naked put or call follows its short's |delta|.

Same {type, trigger, trail} shape as secondary.trail; that trails a kept long off its debit; this trails the spread off its credit. A trail needs both trigger and trail: with either missing it never starts, on any position type, and the config check warns. A type other than profit, dollar or delta (percent, say), or a trail written on one line in quotes (trailing: '{type: profit, trigger: 0.3, trail: 0.1}'), is refused by the config check, and the bot does not run until it is fixed.

With a profit target. Either one can close the trade, whichever is reached first. When the trailing stop fires and a resting profit target is working at the exchange, TradeMint cancels the profit target first and waits for IBKR to confirm that cancel before it buys anything back. If the profit target filled in the meantime, that fill is the close and nothing more is bought; if it filled for part of the position, only the rest is closed. A resting profit target fills at the exchange’s price when the market reaches it, not at the mid. Set the trail’s trigger below the profit target: a trail that starts at or above the target can never start, because the target closes the trade first. A very small trail next to its trigger can be ended by ordinary price movement right after it starts. The config check warns about both and saves the config anyway.

Through a restart. A trailing stop that has started stays started when TradeMint restarts, and carries on from the best level it had reached a few seconds before the restart (on a debit spread, from the level at which it started), so a restart does not reset how much it lets the trade give back. The same holds when TradeMint picks a position back up automatically after an internal error.

Other position types. A short strangle and a naked put or call trail their own value off the credit, as above; a strangle, like a whole iron condor, takes profit or dollar only, because it has no single short whose delta to follow. A long put or call and a debit spread trail off the debit instead, as secondary.trail does: profit or dollar arms once the position has gained trigger and exits when its value gives back trail off its peak. A delta trail is not used on those.

Last revised 2026-11-18© 2026 TradeMint · Cookie preferences