Bank Nifty: open within 1% of previous close, only on expiry day
Keyword help1,002 views
Siddharth Waghela
Hi,
I’m trying to build a strategy where the condition is, the open of Bank Nifty spot is not more than 1% to the previous day close. Also I want the strategy to be executed only on expiry day. How can add it?
Also if it has to be executed any other day apart like Monday only, how can I add that?
Thank you.
Tradetron TeamTradetron team
You can do all three in the Entry condition with AND:
Open within 1% of previous close: use two comparisons joined with AND, so you need no special formula:
today’s OPEN of the spot (read with Position at offset 0 on a daily candle) <=Previous Close of the spot × Number(1.01)
the same OPEN >=Previous Close × Number(0.99)
Multiply with Math Operation (operator '*').
Expiry day only: compare Today with the expiry date, e.g. Today('NSE') == Current Week Expiry('NIFTY BANK', 0) (use Current Month Expiry for monthly). Both return date strings, so they can be compared directly.
A fixed weekday:Week Day returns 1 for Monday, 2 for Tuesday, and so on. Week Day == Number(1) = Monday only.