Create an options execution strategy.
Arguments
Parse $ARGUMENTS as: template underlying expiry-date
$0 = template (short-straddle, iron-condor)
$1 = underlying (e.g. NIFTY, BANKNIFTY). Default: NIFTY
$2 = expiry date in DDMMMYY format (e.g. 30DEC25). REQUIRED - no auto-roll. Ask if not given.
If no arguments, ask the user which template.
Instructions
- Read
algo-expert/rules/options-execution.md, unified-strategy-pattern.md, and self-hosted-strategies.md.
- Confirm with the user that backtest mode is disabled for options strategies (the file will exit with a clear message if
--mode backtest is passed). They use OpenAlgo's UI analyzer toggle for sandbox testing instead.
- Ask the user:
- Lots: how many lots (default 1)
- OTM offsets (iron-condor only): OTM_NEAR for short body (default 4), OTM_FAR for long wings (default 8)
- Entry time (IST, e.g.
09:20)
- Exit time (IST, e.g.
15:15)
- SL multiplier (short_straddle, e.g.
1.30 for 30% premium SL)
- Read the matching template at
algo-expert/rules/assets/<template>/strategy.py.
- Create
strategies/<template>_<underlying>/ and copy + customize.
- Set:
UNDERLYING, UNDERLYING_EXCH, EXPIRY_DATE
LOTS, LOT_SIZE (NIFTY=65, BANKNIFTY=30, FINNIFTY=60 per Apr 2026 SEBI - see lot-sizes.md)
ENTRY_TIME, EXIT_TIME as dtime(H, M)
SL_MULTIPLIER for short straddle
OTM_NEAR, OTM_FAR for iron condor
- Tell the user:
- To upload to
/python: requires apscheduler and pytz packages installed (covered by setup)
- Always re-confirm
EXPIRY_DATE before each cycle - the file does NOT auto-roll
- Set
MODE=live in upload form parameters; OpenAlgo UI's analyzer toggle decides sandbox vs real
- Strategy holds NRML overnight if not flat at EXIT_TIME - cancelallorder + closeposition is called automatically
Templates
| Template |
Description |
short-straddle |
Sell ATM CE + ATM PE at scheduled time, per-leg broker SL at SL_MULTIPLIER * premium, flat at EXIT_TIME |
iron-condor |
OTM_NEAR short CE/PE + OTM_FAR long CE/PE wings, monitor and flat at EXIT_TIME |
Backtest mode is off
The generated file checks for --mode backtest and exits:
Options backtesting is not supported in this skill pack.
Options pricing depends on volatility surfaces, time decay, and OI dynamics
that intraday OHLCV backtests don't capture well.
Use --mode live (with OpenAlgo's UI analyzer toggle for sandbox).
If the user wants to dry-run, they should:
- Flip OpenAlgo's analyzer toggle ON (in
/analyzer UI)
- Run with
--mode live - orders go to the sandbox, not the broker
Avoid
- Do not use icons/emojis
- Do not auto-roll expiry date (
EXPIRY_DATE = "30DEC25" is hardcoded; user must update weekly)
- Do not implement options backtesting - explicitly out of scope
- Do not skip the SL placement - per-leg SL is critical for short premium strategies
1---2name: algo-options3description: Generate options-only execution strategies (short straddle, iron condor). Backtest mode is intentionally disabled. Live mode uses optionsmultiorder + per-leg SL.4---56Create an options execution strategy.78## Arguments910Parse `$ARGUMENTS` as: template underlying expiry-date1112- `$0` = template (`short-straddle`, `iron-condor`)13- `$1` = underlying (e.g. NIFTY, BANKNIFTY). Default: NIFTY14- `$2` = expiry date in DDMMMYY format (e.g. `30DEC25`). REQUIRED - no auto-roll. Ask if not given.1516If no arguments, ask the user which template.1718## Instructions19201. Read `algo-expert/rules/options-execution.md`, `unified-strategy-pattern.md`, and `self-hosted-strategies.md`.212. Confirm with the user that **backtest mode is disabled** for options strategies (the file will exit with a clear message if `--mode backtest` is passed). They use OpenAlgo's UI analyzer toggle for sandbox testing instead.223. Ask the user:23 - **Lots**: how many lots (default 1)24 - **OTM offsets** (iron-condor only): OTM_NEAR for short body (default 4), OTM_FAR for long wings (default 8)25 - **Entry time** (IST, e.g. `09:20`)26 - **Exit time** (IST, e.g. `15:15`)27 - **SL multiplier** (short_straddle, e.g. `1.30` for 30% premium SL)284. Read the matching template at `algo-expert/rules/assets/<template>/strategy.py`.295. Create `strategies/<template>_<underlying>/` and copy + customize.306. Set:31 - `UNDERLYING`, `UNDERLYING_EXCH`, `EXPIRY_DATE`32 - `LOTS`, `LOT_SIZE` (NIFTY=65, BANKNIFTY=30, FINNIFTY=60 per Apr 2026 SEBI - see `lot-sizes.md`)33 - `ENTRY_TIME`, `EXIT_TIME` as `dtime(H, M)`34 - `SL_MULTIPLIER` for short straddle35 - `OTM_NEAR`, `OTM_FAR` for iron condor367. Tell the user:37 - To upload to `/python`: requires `apscheduler` and `pytz` packages installed (covered by setup)38 - Always re-confirm `EXPIRY_DATE` before each cycle - the file does NOT auto-roll39 - Set `MODE=live` in upload form parameters; OpenAlgo UI's analyzer toggle decides sandbox vs real40 - Strategy holds NRML overnight if not flat at EXIT_TIME - cancelallorder + closeposition is called automatically4142## Templates4344| Template | Description |45|---|---|46| `short-straddle` | Sell ATM CE + ATM PE at scheduled time, per-leg broker SL at SL_MULTIPLIER * premium, flat at EXIT_TIME |47| `iron-condor` | OTM_NEAR short CE/PE + OTM_FAR long CE/PE wings, monitor and flat at EXIT_TIME |4849## Backtest mode is off5051The generated file checks for `--mode backtest` and exits:52```53Options backtesting is not supported in this skill pack.54Options pricing depends on volatility surfaces, time decay, and OI dynamics55that intraday OHLCV backtests don't capture well.56Use --mode live (with OpenAlgo's UI analyzer toggle for sandbox).57```5859If the user wants to dry-run, they should:601. Flip OpenAlgo's analyzer toggle ON (in `/analyzer` UI)612. Run with `--mode live` - orders go to the sandbox, not the broker6263## Avoid6465- Do not use icons/emojis66- Do not auto-roll expiry date (`EXPIRY_DATE = "30DEC25"` is hardcoded; user must update weekly)67- Do not implement options backtesting - explicitly out of scope68- Do not skip the SL placement - per-leg SL is critical for short premium strategies