Document 1 of 3, step 3. You approve it before any code is written.
Rules Spec for Alex Sample
Solo plan, October 14, 2025.
These are your trading rules as you gave them to me. I build your bot to follow them exactly. I don't choose rules, tickers or sizes, nothing here is a recommendation, and no results are promised.
Your rules
-
R1
What the bot trades
The bot trades single-leg options on TSLA. It buys call options to open. It never sells an option to open.
The entry conditions read the stock's price bars. The same rules apply to every ticker.
Your plan is Solo, which covers one ticker.
-
R2
Which contract
Expiry: the first listed expiry at least 7 trading days after the trade date.
Strike: 1 listed strike out of the money, measured from the stock's last price when the entry is sent.
-
R3
Checks before an option entry
No option entry is sent unless all of these hold: the contract is in today's option list; it has a live bid and ask no older than 10 seconds (a separate limit from the stale-price limit in the size and limits rule); someone is bidding (a bid above zero); the bid is below the ask; the spread is no wider than $0.15 and no wider than 10% of the midpoint; and neither the contract nor the stock is halted.
These checks apply to entries only, never to closes.
-
R4
When the bot trades
New entries are sent only from 11:00 am until just before 1:30 pm New York time, every weekday the market is open.
Everything the bot holds is closed at 3:45 pm.
On early-close days the bot does not trade.
-
R5
Call entry (RSI level)
Buy a call when all of these are true on a closed 5-minute bar:
- The 14-bar RSI of closes crosses above 35.
-
R6
Repeat entries
At most 1 entry per ticker per day.
After the conditions trigger, at least one closed bar must fail them before they can trigger again.
-
R7
Entry orders
Entries are limit orders at the contract's midpoint, rounded down to a valid price step, then raised 1 price step toward the ask.
An entry that has not filled 30 seconds after it is sent is cancelled. The bot does not re-price it.
-
R8
Exits
Reference price: the limit price. Stops and targets are percentages of the option's price, set when the entry is sent, and rounded to a valid price step toward the reference price. A stop or target that would be under $0.05 means no entry is sent.
Stop: 25% below the reference price. It is sent with the entry and rests at IBKR as a stop order. It triggers on the bid and ask, never on the last trade (IBKR's double bid/ask method).
Target: 40% above the reference price. The bot watches it; it is not sent to IBKR. When the bid reaches it, the bot cancels the stop and sends one market sell for the whole position, so the fill can be below the target. Target watching works only while the bot is running and connected.
The bot closes the whole position at once; it does not sell part of it.
Anything still open at 3:45 pm is closed then.
-
R9
Size and limits
Size: 1 contract per entry.
Largest position per ticker: 1 contract, counting working orders.
Most tickers held at once: 1.
Most entries per day, all tickers together: 1.
Daily loss limit: $150, counting open positions and commissions. Reaching it closes everything and stops new entries for the rest of the day.
Most money in open positions and working entries at once: $1,000.
No stand-down after losing trades.
Stale-price limit: 15 seconds. A price older than this blocks new entries.
Words used above
- Crosses above: at or below on the bar before, above on this bar. Crosses below: at or above on the bar before, below on this bar.
- Moving averages and RSI use the closes of today's 5-minute bars only, so they have no value until enough bars have closed today.
How every AwayTrader bot behaves
- All times are New York time. The bot trades the regular session only, 9:30 am to 4:00 pm, and its rules read today's bars only.
- While the bot is running, everything it holds is closed at the closing time in your rules each day. If your rules let the bot trade on an early-close day, it closes 10 minutes before the market close when that is earlier. Market holidays are built in.
- The stop is sent with the entry and rests at IBKR. It becomes a market order when it triggers, and it keeps working if the bot or the computer stops. The target is watched by the bot, as your exit rule says.
- When the bot starts or reconnects it reads your positions and orders at IBKR. If it finds a position in one of its tickers that it did not open, it stops trading that ticker and alerts you.
- The daily loss limit counts open positions and commissions. Reaching it closes everything and stops new entries for the day. KILL closes everything and stops the bot. PAUSE stops new entries; it does not stop a target or stop sell that is already running. FLATTEN closes everything.
- If the latest price is older than your stale-price limit, the bot sends no new entry. Closes and exits are never blocked by it.
- You log in to TWS or IB Gateway yourself, at least once a week when IBKR asks. Alerts go to your Discord server and your email.
- Before any live trading the bot runs five standard fault drills and a paper-trading test of 5 sessions. Any rule change restarts the paper test.
- If IBKR does not confirm a sell, the bot stops that ticker for the day and alerts you to close the position yourself in TWS. By then the stop may already be cancelled, so the position may have no stop at IBKR until you close it.
Your setup
- IBKR individual cash account in your own name, with options permission level 2.
- Runs on your Windows 10 computer with IB Gateway, with the clock set to sync with internet time.
- You will use a second IBKR username for the phone app, so the bot's login is not interrupted.
- Alerts go to your Discord server and your email. Market data, alert settings and logins are set up together on the setup call.
- Cash account: the bot does not track settled cash. IBKR may refuse or restrict an order that would use unsettled funds.
Not part of this build
- Pre-market or after-hours trading.
- Indicators that need earlier days' bars.
- Stop or stop-limit entry orders, or moving a stop that rests at IBKR.
- Re-pricing a limit entry that has not filled.
- Size or loss limits as a percent of the account.
- Skipping earnings days automatically (list those dates instead).
- Selling options to open (short options), adjusted or non-standard contracts, or options on more than one ticker.
- Expiries more than 14 days after the trade date.
- Option spreads or any order with more than one leg, index options, or greeks.
- An option stop that triggers on the stock's price.
- An option target as a resting order at IBKR.
- Backtests of option strategies.
Approving this spec
Read every rule above. If it matches what you want, reply to my email with: I approve the Rules Spec dated October 14, 2025. The build starts after that reply. If anything is wrong, tell me what to change and I'll send you a new version.
After approval, a change to any rule makes a new version and restarts the paper test.
Trading involves risk of loss. For education only, not financial advice.