Wanted some help with writing script for:
Write a alert tradescript that will run in Zerodha
Generate an alert on a daily 1 minute timeframe when 1) 2) and 3) below are satisfied:
- At any point of time, check for any stock trading in NSE under Nifty 50 whose LTP as compared to Close price 15 minutes back >0.5%
- The stock which is being checked is a part of an NSE sector. eg. SBIN is a part of NIFTY PSU BANK. Check the if 90% of other stocks in the same sector is trading with LTP as compared to Close price 15 minutes back >0.5%. This means if the sector contains 12 stocks, and 8 stocks show a behaviour of LTP as compared to Close price 15 minutes back >0.5%, then the percentage of socks trading in the same sector with this condition is 0.66% and will result in a false condition. If 11/12 stocks would be trading with the above condition then only this will evaluated to true
- Check if LTP>EMA(10)
If all the above are true generate an alert - Thats it