Inside day nr4 price pattern

Inside Day NR4 (ID/NR4) Google Sheets Formula

Last Updated on 31/03/2023 by Ndanileka

WHAT IS AN INSIDE DAY NR4

The Inside Day-NR4 pattern is a combination of two distinct chart patterns: the Inside Day and the Narrow Range 4 (NR4). Traders use this pattern to identify potential breakouts or trend reversals, as it signifies a period of market indecision followed by a compression of volatility.

Inside Day:
An Inside Day occurs when the entire trading range (high and low prices) of a stock for a given day falls within the trading range of the previous day. This pattern indicates market indecision, as neither buyers nor sellers could push the price significantly beyond the previous day’s range.

Current day within the last = inside Day

Narrow Range 4 (NR4):
The NR4 pattern is identified when today’s trading range (the difference between the high and low prices) of a stock is the narrowest it has been in the last four days. This pattern represents a compression of volatility, suggesting a potential breakout or trend reversal may be imminent. In contrast to the Inside Day pattern, the Narrow-Range-4 does not necessarily have to open and/or close within the previous day’s range. Instead, it is defined by its range compared to the previous days rather than its position relative to them. This means the Narrow-Range-4 can exhibit higher or lower opens and/or closes than the preceding day.

Smallest range of last 4 = NR4

While the Inside Day and Narrow-Range-4 patterns individually occur quite frequently and may not provide reliable trading signals on their own, combining them creates a more uncommon pattern that enhances its potential for tradability. This merged pattern is less frequent and can offer a stronger indication of potential breakouts or trend reversals, making it a more valuable tool for traders.



INSIDE DAY GOOGLE SHEETS FORMULA

In a previous article, we completed the Inside Day formula. In this response, I will simply present the complete formula for Inside Day and then proceed to develop the full NR4 formula.

The criteria for an Inside Day pattern are as follows:

  • Today’s High (TH) must be lower than Yesterday’s High (YH), which can be represented as TH < YH.
  • Today’s Low (TL) must be higher than Yesterday’s Low (YL), which can be represented as TL > YL.

If both conditions are met, it indicates an Inside Day has occurred.

=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),),"Inside Day","")

NARROW RANGE 4 (NR4) GOOGLE SHEETS FORMULA

To identify the Narrow Range 4 (NR4) pattern, you need to find instances where today’s trading range (the difference between the high and low prices) of a stock is the narrowest it has been in the last four days. Here’s a step-by-step process to identify the NR4 pattern using the Google Finance function.

In our Example Cell B1 = “NVDA” (NVIDIA Corporation).

Step 1.1. Request all historical prices from the previous 3 trading days.

=QUERY(GOOGLEFINANCE(B1,"all", TODAY() - 8, TODAY()),"ORDER BY Col1 desc LIMIT 3")

Step 1.2. Calculate the trading range for each day:
Calculate the trading range for each day by subtracting the low (Col4) from the high (Col3).

=QUERY(GOOGLEFINANCE(B1,"all", TODAY() - 8, TODAY()),"SELECT (Col3-Col4) ORDER BY Col1 DESC LIMIT 3")

Step 1.3. Wrap the query from step 2.1 with the MIN() function to return the “min range”.

=MIN(QUERY(GOOGLEFINANCE(B1,"all", TODAY() - 8, TODAY()),"SELECT (Col3-Col4) ORDER BY Col1 DESC LIMIT 3"))

Step 1.4. Request today’s range by subtracting today’s low from today’s high.

=GOOGLEFINANCE (B1,"high")-GOOGLEFINANCE (B1,"low")

Step 2. Complete NR4 pattern:

This formula checks if the trading range of the current day ( Step 1.4) is the narrowest among the last four days If it is, the formula returns “NR4”; otherwise, it returns an empty string.

The logic expression is interpreted as, If today’s range is smaller than the smallest range from the previous 3 days, return: “NR4”

=IF((GOOGLEFINANCE (B1,"HIGH")-GOOGLEFINANCE (B1,"LOW"))<(MIN(QUERY(GOOGLEFINANCE(B1,"all", TODAY() - 8, TODAY()),"SELECT (Col3-Col4) ORDER BY Col1 DESC LIMIT 3"))),"NR4",""))


INSIDE DAY NR4 (ID-NR4) GOOGLE SHEETS FORMULA

In the final step, we will create a formula to identify the ID-NR4 pattern by combining the NR4 formula from Step 2 with the Inside Day formula.

To achieve this, we will use the AND() function to wrap the NR4 and Inside Day formulas. The AND() function is employed to verify if both formulas hold true. Essentially, we are asking: “Is there an Inside Day? And is there an NR4?”

=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","")