Skip to content

Latest commit

 

History

History
49 lines (33 loc) · 1.52 KB

File metadata and controls

49 lines (33 loc) · 1.52 KB

Opening Range Breakout (ORB) Strategy Template (Nubra Python SDK)

The classic intraday 9:15–9:30 opening range breakout for Indian markets, built on the Nubra Python SDK (nubra-sdk).

The strategy

  1. Let the market settle from 9:15 to 9:30 record the high and low of that window
  2. BUY when price breaks above the range high (stoploss = range low)
  3. SELL when price breaks below the range low (stoploss = range high)
  4. One trade per day, checked once per minute

What it demonstrates

  • Intraday 1-minute candles via market.historical_data(...) with intraDay: True
  • Instrument lookup for the refId via the refdata module
  • Stoploss attached to the entry order via exitConfig.stoplossParams
  • A simple, honest polling loop with error handling around every network call

Safety switch

Dry run by default it prints the range and the breakout signal but places nothing until:

PLACE_ORDER = True

Settings

SYMBOL = "RELIANCE"
QTY = 1
RANGE_START = (9, 15)
RANGE_END = (9, 30)

Prices from the SDK are integers in paise (₹1 = 100). Candle timestamps use your computer's local timezone — run on a machine set to IST.

Run it

pip install -r requirements.txt
python opening_range_breakout.py

Start it before 9:30 IST on a trading day; it waits for the range to complete, then watches for the break.

⚠️ Disclaimer

Educational example only — not investment advice. Breakouts fail often; always use the stoploss. Trade at your own risk.