- Get the High and Low data of last 7 days
- Calculate the range of each day i.e. high - low) for each day
- Compare the range of a today and previous 6 days range
- If today’s range is smallest of all 7 days, then mark today as ‘Indicating Day’…else not.
Go long above the Day’s high of Indicating Day with stop at the Day’s Low of Indicating day.
Or Go short below the Day’s Low of Indicating day with stop at the Day’s High of Indicating day.
This strategy is based on EOD figures.
High = HHV (7) (7th day high)
Low = LLV (7) (7th day low)
Range (7) = High - Low (Range of 7th day)
Compare Range of all 7 days. If the current day (i.e. Range 1) range is smaller, buy above Range (1) high with SL as Range (1) Low & Sell below Range (1) low with SL as Range (1) high
This is for one stock. Is there any possibility to do it for nifty 50.
Can someone mention how to code continuous looping in Pi?