OPEN-SOURCE SCRIPT

3 Day Lookback [TFO]

By tradeforopp
This 3 Day Lookback indicator aims to display key information about price with respect to its previous 3 day highs and lows. It was built with the intention of being compact in order to not take up a lot of chart space.

The core component of this indicator is the table. From this table, we look at price with respect to the ranges from 1, 2, and 3 days ago, and assign it a color code. By default, we use 🟢, 🟡, and 🔴 to indicate that price is above, stuck inside, or below these ranges, respectively.

Take the following chart as an example. We manually drew these boxes to encompass the range of each day, from high to low. The leftmost box from 3 days ago is colored red to reflect the fact that price is below that day's low. This is why the table indicates a state of 🔴 for the range from 3 days ago. Then, the following two days are colored yellow to indicate that price is currently trading inside their ranges, which is why the state for both of those days is indicated as 🟡 in the table.

snapshot

In a similar example below, we can see that price is clearly above the high from 3 days ago and the high from 2 days ago, which is reflected in the table with a state of 🟢 for both. However, since price is currently trading within the range from 1 day ago, it is assigned a state of 🟡 in the table.

snapshot

As you may have noticed in the above examples, each day's high and low is indicated with labels (ex. "2H" and "2L" for the high and low from 2 days ago). These are optional and can be turned off in the indicator's settings. The lines tracking the previous 3 day highs and lows may also be turned off so that you're just left with the table, as is shown in the below example.

snapshot

With this minimalistic table, users can get a quick glance at how price is trading with respect to the last few days of price action. Hopefully this proves useful for mobile users as well, since the indicator can be reduced to a simple table that doesn't take up much chart space.
3daysCandlestick analysishighsandlowsictlookback
tradeforopp

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer