I have 2 sets of symbols (calls and Puts in a watch list (calls with "CE" in their ticker name and put "PE" in their symbol) ex: BANKNIFTY07NOV1930500CE.NFO , BANKNIFTY07NOV1930500PE.NFO
I would like to get calls and puts trading close to each other in a price range about 10 and to calucalte MA oF those 2 symbols combined price
Ex:
How many symbols are there in the Watchlist that you are looping? Because looping the entire Watchlist again and again on every refresh is inefficient.
What are the conditions when you've more than "2 symbols" from the same watchlist trading near 10?
i am aware of that one. Those things can be filtered out by adding certain conditions once i get basic template for the logic intended to achieve is efficient enough .
If there is any way to achieve without loops please feel free to point to me so that i can have a look and try