Flashcrash Finder Indicator (work in progress)

Taking a pine script course, so still learning.
Here is a basic crash finder, it finds significant fat tailed candlesticks .
Blue is downside crashes
Red is upside crashes
Values greater than 2.5% are significant, however this value can be changed.
For example; look at January 3rd 2019, there was a flash crash.
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 a publication is governed by House Rules. You can favorite it to use it on a chart.

Want to use this script on a chart?