Bank Nifty streak strategy help required

Stock passes all of the below filters in nifty and banknifty segment:

[0] 5 minute Supertrend(14,0.7) Crossed below [0] 5 minute Close

[0] 5 minute Open Equals [0] 5 minute Low

Stock passes any of the below filters in nifty and banknifty segment:

[0] 5 minute Rsi(7) Greater than Number 60

[0] 5 minute Rsi(7) Less than Number 33

Hi @Vikas464 please refer to the image below to learn how to create the first set of conditions:

Also, refer to the image below to learn how to create the second set of conditions:

We have run the scanners on the ‘Nifty weekly’ basket. You can run on the Banknifty options baskets as well.

1 Like

Thank you Mr. Sayan for the help… only confusion is should i keep RSI higher that 33 or lower than??

1 Like

The RSI should be kept as higher than 33 and lower than 60 to get results.

If you would have kept the RSI higher than 60 and lower than 33, it would not fetch any results since this condition is not logical. In case you use the ‘OR’ operator instead of ‘AND’, then the above condition would fetch results.

Got it… thanks again for your help

1 Like

Offtopic →

The code is giving terrific results in backtest.

# Stock Filters - Nifty and BankNifty Segment
is_valid_stock = False

# Filter 1: 5 minute Supertrend(14,0.7) Crossed below 5 minute Close
if supertrend_5min[-1] < close_5min[-1]:
    is_valid_stock = True

# Filter 2: 5 minute Open Equals 5 minute Low
if open_5min[-1] == low_5min[-1]:
    is_valid_stock = True

# Filter 3: 5 minute Rsi(7) Greater than Number 60
if rsi_5min[-1] > 60:
    is_valid_stock = True

# Filter 4: 5 minute Rsi(7) Less than Number 33
if rsi_5min[-1] < 33:
    is_valid_stock = True

if is_valid_stock:
    print("Stock passes the filters.")
else:
    print("Stock does not pass the filters.")

Just to double check, these are the correct parameters right?

1 Like