Automate an index options breakout and reversal strategy

via Freelancer ·

Budget / Salary₹1,500–12,500
TypeFreelance project
LocationRemote
Posted1 hour ago
I need an automated trading system built for an index options breakout-and-reversal strategy. The full logic is below. Please read it before bidding.

PLEASE STATE IN YOUR BID
1. Fixed price (INR)
2. Delivery timeline
3. Which broker/API you would use
4. Whether I receive the full source code
5. What paper trading and support are included (and for how long)
6. Who hosts it (my server or yours) and any running cost

OVERVIEW
Record the index futures high/low of the first minutes of the day (the opening range). Price breaks above the range: buy calls. Price breaks below: buy puts. Each morning nine level sets of targets and stops are supplied. As price reaches each target, a reversal line follows behind it. If price turns back through that line, profit is booked, the position switches to the opposite side, and the next level set is chosen from a fixed table. Beyond the last level, new levels are projected and the line trails price. Daily limits and a fixed closing time end the day.

TERMS
- Futures price: last traded price of the current-month index futures. Every decision uses this price only.
- Range High / Low: highest and lowest futures price in the opening range window. Range Width = High - Low.
- Long = holding call-side positions. Short = holding put-side positions. Never both at once.
- Level set: ten price levels for the day. There are nine sets.
- Target / Confirmation: targets are profit levels; each Confirmation lies beyond its Target (crossing it means the move continued strongly).
- Progress: furthest level reached since the position opened (none, T1, C1, T2, C2, beyond).
- Reversal line: price at which profit is booked and the side switches. It only moves in the position's favour.
- Flip: stop-and-reverse that happens before Target 1 is reached.

DAILY TIMELINE (all times adjustable)
- 09:15-09:25 opening range forms, no trading
- By 09:24 the day's level sets must be available; if missing/invalid, no trading that day
- 09:25 range, ATM strike and traded strikes are fixed; watching for first entry begins
- 09:25-15:10 entries, flips, reversals
- 15:10 no new positions (including reversals); open positions still managed
- 15:20 all positions closed

RULES
Instrument: current-month futures of NIFTY, BANKNIFTY or SENSEX drive decisions; trades are in that index's weekly options. Expiry = nearest weekly, unless it has fewer than "Minimum days to expiry", then the next weekly.
ATM strike = futures price at end of opening range, rounded to nearest strike. Traded strikes = "Number of strikes" centred on ATM, spaced by "Strike spacing" (e.g. 3 strikes, spacing 50, ATM 24,500 -> 24,450 / 24,500 / 24,550). Strikes stay fixed all day unless "Re-centre on reversal" is on (then recomputed at every profit reversal).

Level sets: Opening Set, four Long-Exit Sets (1-4), four Short-Exit Sets (1-4). Each set holds ten values:
- Up Target 1, Up Conf 1, Up Target 2, Up Conf 2 (used while Long, above price, rising order)
- Down Target 1, Down Conf 1, Down Target 2, Down Conf 2 (used while Short, below price, falling order)
- Long Stop (while Long, before Up Target 1, below price)
- Short Stop (while Short, before Down Target 1, above price)
The Opening Set may leave the two stops empty. If any set is missing, has an empty value (other than those two), or levels are out of order: no trading that day.

First entry: after the range ends, price above Range High + Entry buffer -> go Long using the Opening Set; below Range Low - Entry buffer -> go Short using the Opening Set. If the Opening Set has no stops: Long Stop = Range Low - Entry buffer, Short Stop = Range High + Entry buffer.
Flip: before Up Target 1, a Long whose price falls below Long Stop flips to Short (same level set). Mirror for Short. When flips reach "Maximum flips per day", close everything and stop for the day.

While Long (reversal line by progress):
- None yet: no line; Long Stop and flip rules apply
- Up Target 1: line = Up Target 1 - Reversal buffer; Long Stop no longer applies
- Up Conf 1: line unchanged (only changes which set comes next)
- Up Target 2: line = Up Target 2 - Reversal buffer
- Up Conf 2: line = the higher of (Up Target 2 - Reversal buffer) or (highest price since then - Trailing distance); trailing and projected levels begin
Profit reversal: price falls below the line -> close Long, open Short, switch to the next level set; progress restarts at "none". If price jumps past several levels at once, all count as reached.
While Short: exact mirror using the Down values and Short Stop (line above price = Down Target + Reversal buffer; trailing uses lowest price since Down Conf 2 + Trailing distance; line never moves up).

Next level set after a profit reversal (flips never change the set):
- Progress Target 1: closing Long -> Long-Exit Set 1; closing Short -> Short-Exit Set 1
- Confirmation 1: Long-Exit Set 2 / Short-Exit Set 2
- Target 2: Long-Exit Set 3 / Short-Exit Set 3
- Confirmation 2 or beyond: Long-Exit Set 4 / Short-Exit Set 4
Same table after every later reversal (a set can be reused in a day). This table must be editable.

Beyond the last level: after Conf 2, add levels one pair at a time: next Target = previous Confirmation + Projection target factor x Range Width; next Confirmation = that Target + Projection confirmation factor x Range Width. Reaching a projected Target lifts the reversal line to Target - Reversal buffer if higher than the trailing value (mirrored for Short).

Position structure (one structure for the whole day):
- Option buying: Long = buy calls at each traded strike; Short = buy puts at each traded strike. Open = buy all; close = sell all.
- Hedged spread: at each traded strike buy the option and sell the same number of options "Hedge distance" strikes further out of the money. Open = buy first, sell only after buys are done; close = buy back the sold options first, then sell the bought ones.
Every flip/reversal fully closes the current position before opening the new one.
Size per strike = Lots per strike x Call size factor (calls) or Put size factor (puts). After each profit reversal: size = previous size x Reversal size factor, rounded down to whole lots, never above Maximum lots per strike. Flips always use the starting size.

Daily limits: close everything and stop for the day when the day's loss (booked + open) reaches the Daily loss limit; or the day's profit reaches the Daily profit target (if set); or profit reversals reach Maximum reversals per day.

ADJUSTABLE VALUES (defaults) - all must be changeable without changing logic
Index NIFTY; Min days to expiry 1; Number of strikes 3 (1-7); Strike spacing 1 strike; Re-centre on reversal Off; Opening range window 09:15-09:25; Level sets needed by 09:24; Last new position 15:10; Closing time 15:20; Entry buffer 5 pts; Reversal buffer 3 pts; Trailing distance 25 pts; Projection target factor 0.5; Projection confirmation factor 0.25; Structure Option buying (or Hedged spread); Hedge distance 4 strikes; Lots per strike 1; Call/Put size factor 1.0/1.0; Reversal size factor 1.0; Max lots per strike 10; Max flips/day 3; Max reversals/day 6; Daily loss limit Rs 25,000; Daily profit target Off.

WORKED EXAMPLE (illustrative): Entry buffer 5, Reversal buffer 3, 3 strikes, spacing 50. Range High 24,530, Low 24,470; futures at 09:25 = 24,512 -> ATM 24,500, strikes 24,450/24,500/24,550. Opening Set: Up T1 24,600, Up C1 24,630, Up T2 24,690, Up C2 24,720, stops empty. At 09:31 futures 24,536 (above High + 5) -> buy calls, Long, Long Stop 24,465. 10:05 reaches Up T1 -> line 24,597. 10:20 crosses Up C1 -> line unchanged. 10:50 falls to 24,596 (below line) -> sell calls, buy puts, Short, Long-Exit Set 2. 15:20 all positions closed.

Please include your relevant experience with Indian index options automation.
financial markets algorithmic trading
Apply on Freelancer →

Project sourced from Freelancer.com. Applications happen directly on the original platform — we never collect your data.