This script will attempt to find the location of the third wave in the Elliot Wave Theory. The bars will become highlighted when possible wave 3 criteria is met. Multiple bars in a row may have a painted background. The point at which the bars are no longer painted will potentially be at or near the end of wave 3.
The background paints a baby blue for wave 3s in an overall uptrend, and pink for downtrends.