Intraday Algo for Indian Stocks

Job ID: 40574448

Budget: ₹600 – ₹700 INR

#Note:OHLC </>/crossed_below/crossed_above should be agnostic for all combos


Long Combo 1

#Note:Stock universe can be detected before opening in this combo 1

C1: Accept ONLY if Daily Open = Daily Low (Bullish opening pattern)
C2: Daily {LTP} crossed_above Daily Ema ( Daily Close , 5 )
C3: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) > WMA(RSI(16),35)
C4: Only 1 trade per stock (dedup)

Long Combo 2

#Note:Stock universe can be detected before opening in this combo 2

C1: Accept ONLY if Daily Open = Daily Low (Bullish opening pattern)
C2: 1 day ago Close > 1 day ago Low
C3: 2 days ago Close > 2 days ago Low
C4: 1 day ago Close > 1 day ago Sma ( Daily Close , 20 )
C5: 2 days ago Close > 2 days ago Sma ( Daily Close , 20 )
C6: Which ever High is Greater in last two days Long on it + Buffer of 5 ticks (Customizable)
C7: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) > WMA(RSI(16),35)
C8: Only 1 trade per stock (dedup)



Long Combo 3
C1: Accept ONLY if Daily Open = Daily Low (Bullish opening pattern)
C2: [=1] 5 minute Close > [=1] 5 minute Low #Note: [=1] is the first candle of day
C3: [=1] 5 minute Close > [-1] 5 minute Close #Note: [-1] is the previous candle of day
C4: LTP > [=1] ORB Candle High + Buffer of 5 ticks (Customizable)
C5: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) > WMA(RSI(16),35)
C6: Only 1 trade per stock (dedup)


Long Combo 4
C1: Accept ONLY if Daily Open = Daily Low (Bullish opening pattern)
C2 [-3] 1 hour High > [-3] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C3:[-2] 1 hour High > [-2] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C4 [-1] 1 hour High > [-1] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C5:[-1] 1 hour High > [-2] 1 hour High #Note: [-1,-2,-3] are the previous candle of day
C6:[-1] 1 hour Low > [-2] 1 hour Low #Note: [-1,-2,-3] are the previous candle of day
C7:LTP > [-1] Candle High + Buffer of 5 ticks (Customizable)#Note: [-1,-2,-3] are the previous candle of day
C8:RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) > WMA(RSI(16),35)
C9:Only 1 trade per stock (dedup)

==================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

Short Combo 1

#Note:Stock universe can be detected before opening in this combo 1

C1: Accept ONLY if Daily Open = Daily High (Bearish opening pattern)
C2: Daily {LTP} crossed_below Daily Ema ( Daily Close , 5 )
C3: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) < WMA(RSI(16),35)
C4: Only 1 trade per stock (dedup)


Short Combo 2

#Note:Stock universe can be detected before opening in this combo 2

C1: Accept ONLY if Daily Open = Daily High (Bearish opening pattern)
C2: 1 day ago Close > 1 day ago Low
C3: 2 days ago Close > 2 days ago Low
C4: 1 day ago Close < 1 day ago Sma ( Daily Close , 20 )
C5: 2 days ago Close < 2 days ago Sma ( Daily Close , 20 )
C6: Which ever Low is Lesser in last two days Short on it + Buffer of 5 ticks (Customizable)
C3: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) < WMA(RSI(16),35)
C4: Only 1 trade per stock (dedup))


Short Combo 3

C1: Accept ONLY if Daily Open = Daily High (Bearish opening pattern)
C2: [=1] 5 minute Close > [=1] 5 minute Low #Note: [=1] is the first candle of day
C3: [=1] 5 minute Close < [-1] 5 minute Close #Note: [-1] is the previous candle of day
C4: LTP < [=1] ORB Candle Low + Buffer of 5 ticks (Customizable)
C5: RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) < WMA(RSI(16),35)
C6: Only 1 trade per stock (dedup)



Short Combo 4

C1: Accept ONLY if Daily Open = Daily High (Bearish opening pattern)
C2 [-3] 1 hour High < [-3] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C3:[-2] 1 hour High < [-2] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C4 [-1] 1 hour High < [-1] 1 hour Lower Bollinger band ( 20 , 2 ) #Note: [-1,-2,-3] are the previous candle of day
C5:[-1] 1 hour High < [-2] 1 hour High #Note: [-1,-2,-3] are the previous candle of day
C6:[-1] 1 hour Low < [-2] 1 hour Low #Note: [-1,-2,-3] are the previous candle of day
C7:LTP < [-1] Candle High + Buffer of 5 ticks (Customizable)#Note: [-1,-2,-3] are the previous candle of day
C8:RSI_CONFIRMATION_INTERVAL EMA(RSI(16),23) < WMA(RSI(16),35)
C9:Only 1 trade per stock (dedup)









Dedup Logic for Long or Short Mode:
Strategy Interval 5m, 10m, 15m, 30m, 1h, 75m, D -> One stock per day
Strategy Interval W -> One stock per week
Strategy Interval M -> One stock per month



Do NOT hardcode strategy conditions using if/else statements. The Python engine should be generic and strategy-agnostic. All strategy behavior must come from external JSON configuration files stored in "\openalgo\strategies\scripts\state". Any changes in the json file should get implemented by the execution engine without giving errors. Avoid hardcoded condition logic. Any parameter must be modifiable without changing engine code. The json file should contain all the conditions for entry, sl and targets, all user editable configurations and externalizations configurations, the various configs for exchange, tier mechanism, product type config, order execution configs, exchange config, TRADING MODE SETTINGS & TIER EXIT CONFIGURATION, API keys, etc in such a way that i should not touch the code at all, every config changes should be possible from json file. The json file should have all the comments and possible values that can be used by user. The configs should be in The Formatting Style sample given below.

Sample Requirements:
Support Open, High, Low, Close fields
Support operators >, <, =, crossed_above, crossed_below,
Support lookback periods from 1–500
Support DAY, WEEK, MONTH, 5m, 10m, 15m, 30m, 1h, 75m, 4h

Support expressions like:
1 day ago Open > 2 day ago High
Any parameter must be modifiable without changing engine code
Strategy should support Accept and Reject rules
Support AND/OR grouped conditions
Separate data-fetch layer from evaluation layer
Add validation
Add logs showing:
C1 PASS: [1 DAY OPEN=500] > [1 DAY LOW=480]
Use a generic evaluator:
evaluate_condition(rule)
Avoid hardcoded condition logic



Cold-Start Guard (Block ORB Condition If ORB Already Breached)

On cold start (first run) or restart mid-day, after loading the ORB reference,
immediately check whether the ORB level has already been breached today.

EQ/SPOT check:
LONG: if state["dailyhigh"] > ORB_high → set orb_cold_start_skip = True
SHORT: if state["dailylow"] < ORB_low → set orb_cold_start_skip = True

FUT chart mode check (applicable for FUT and OPT both):
LONG: if state["futdailyhigh"] > FUT_ORB_high → set orb_cold_start_skip_fut = True
SHORT: if state["futdailylow"] < FUT_ORB_low → set orb_cold_start_skip_fut = True

When `orb_cold_start_skip` is True, ORB condition is blocked for the ENTIRE day for
that symbol. No new entries via those conditions. Existing positions are not affected.
This guard is checked inside `check_chart_conditions()` before evaluating ORB condition.
A log line is emitted: `"REJECT C13: cold-start skip — ORB already breached at startup"`.
Coldstart Skip should display all the stock list in the same way of stock universe and should give 1 symbol output for audit purpose.


So there are four combos for long and four combos for short all these combos should be working in one file and all the trades should be generated from one file.
If you are comfortable with four combos of long in one file and four combos of short in second file then there is no issue but in logs of openalgo it should show which trade is triggered from which combo.


So this is my strategy and I want it in a python script so that I can put that python script in openalgo and run my strategy.