i want to enter a option selling position on monday and exit on thursday , how to code it. my code for entry is
( Time ( ‘NSE’ ) >= Number ( ‘0950’ ) ) and ( Positions Detail ( ‘strategy_id’, ‘run_counter’, ‘All’, ‘All’, ‘All’, ‘quantity’, ‘NIFTY 50’ ) == Number ( ‘0’ ) ) and ( Time ( ‘NSE’ ) <= Number ( ‘955’ ) ) and ( Week Day ( ‘NSE’ ) == Number ( ‘1’ ) )
and my code for exit is
( Time ( ‘NSE’ ) >= Number ( ‘1525’ ) ) and ( Today ( ‘NSE’ ) == Current Week Expiry ( ‘NIFTY 50’, ‘0’ ) )
i tried this code in backtest for six months but showing only 1 position. please help