Inside Day Calculation in Google Sheets

DEFINITION

Inside days are when the stocks current day’s price trades within the bounds of the previous day’s High and Low. Thus remaining “inside” as opposed to a venture beyond as is more often the case.

INDENTIFYING & UNDERSTANDING

Inside days can be identified by the daily candle of the chart on the D1 timeframe opening and closing without ever breaking the previous candlestick’s high or low.

They can be indicative of indecision in the market.

Inside days always as a result have a smaller trading range than the past day’s range, accounting for other factors beforehand, it thus serves as a very reliable indicator of a potential contraction in stock price for that period which can produce for use tradable ranges, channels or triangles, depending on other related factors like volatility, the size of the ranges ( both days ) and so on.

Multiple inside days following one another can almost serve as a guaranteed breakout since no range can last indefinitely, one side of the market always wins, leading to a dramatic shift in price which can be profitable if one has the necessary technical system for exploiting it.

EXAMPLES

As can be seen above, this pattern occurs under a variety of sizes and market circumstances, one has to be disciplined in what conditions they use the inside day as a sign of entry.


INSIDE DAY GOOGLE SHEETS CACULATION

To calculate the Inside Day 4 price points are required namely:

Today’s High, Todays Low, Yesterdays High and Yesterdays Low.

In this example we will us Shoprite Holdings Ltd with Google Finance ticker “JSE:SHP”

Step 1

Today’s High



=GOOGLEFINANCE ("JSE:SHP","HIGH")

Step 2

Today’s Low



=GOOGLEFINANCE ("JSE:SHP","LOW")

Step 3

Yesterday’s High

Prerequired knowledge: Historical Data

=QUERY(GOOGLEFINANCE("JSE:SHP","HIGH",today()-6,today()),"select Col2 order by Col1 desc limit 1 label Col2''")

Step 4

Yesterday’s Low

=QUERY(GOOGLEFINANCE("JSE:SHP","LOW",today()-6,today()),"select Col2 order by Col1 desc limit 1 label Col2''")

Step 5

Logic test and combing formula into a single cell.

5.1) If today’s “high” is less than yesterdays “high” return 1

IF((GOOGLEFINANCE("JSE:SHP","high")<QUERY(GOOGLEFINANCE("JSE:SHP","high",today()-6,today())," select Col2 order by Col1 desc limit 1 label Col2''",1)),1,0)

5.2) If today’s “low” is greater then yesterdays “low” return 1

IF((GOOGLEFINANCE("JSE:SHP","low"))>(QUERY(GOOGLEFINANCE("JSE:SHP","low",today()-6,today())," select Col2 order by Col1 desc limit 1 label Col2''",1)),1,0)

5.3) IF 5.1 and 5.2 are both true ( equal to 1) return “Inside Day”.

IF(AND(IF((GOOGLEFINANCE("JSE:SHP","high")<QUERY(GOOGLEFINANCE("JSE:SHP","high",today()-6,today())," select Col2 order by Col1 desc limit 1 label Col2''",1)),1,0),IF((GOOGLEFINANCE("JSE:SHP","low"))>(QUERY(GOOGLEFINANCE ("JSE:SHP","low",today()-6,today())," select Col2 order by Col1 desc limit 1 label Col2''",1)),1,0),),"Inside Day","")
JSE:SHP Inside day 24/06/2021 @ 12:26 UTC +2

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.