Its a simple analysis using Candle Pattern Technique, Engulfing. The script will find the engulf candle by considering three bars before. For Bullish Engulfing it will be colored by yellow, and for Bearish will be white. I reccomend you for using this script in Daily Time Frame.