DESCRIPTION
The Inside Day NR4 pattern is a type of price pattern that occurs when a stock’s price range falls within the previous day’s price range and the current day’s range is the narrowest it has been in the last four days.
GOOGLE SHEETS FORMULA
Cell B1 = Stock Code
=IF(AND(IF((GOOGLEFINANCE (B1,"HIGH")-GOOGLEFINANCE (B1,"LOW"))<(MIN(QUERY(GOOGLEFINANCE(B1,"all", TODAY() - 8, TODAY()),"SELECT (Col3-Col4) ORDER BY Col1 DESC LIMIT 3"))),1,0),IF(AND(IF((GOOGLEFINANCE(B1,"high"))<(QUERY(GOOGLEFINANCE (B1,"high",TODAY()-6,today())," SELECT Col2 ORDER BY Col1 DESC LIMIT 1 label Col2''")),1,0),IF((GOOGLEFINANCE(B1,"low"))>(QUERY(GOOGLEFINANCE (B1,"low",TODAY()-6,today())," SELECT Col2 ORDER BY Col1 DESC LIMIT 1 label Col2''")),1,0),),1,0)),"ID-NR4","")