Creating an indicator from Normalized smoothed MACD (NSMACD) indicator by Dreadblitz using pine script V5

Job ID: 35191672

Budget: $50 – $75 USD

I want to create an indicator from Normalized smoothed MACD (NSMACD) indicator by Dreadblitz using pine script that performs the following 2 things;
1. Shades light blue color on trading view chart area when normalized smoothed MACD changes color from red to green on a daily(1D) timeframe. Also, it should shade red color when NSMACD changes from green to red on daily timeframe. The size of the shaded area should be the range of the lowest to the highest of the daily candle for which the normalized smoothed MACD changed color. See the attached photo for more clarity. The shades should go away after NSMACD changes color for the second time on daily time frame. i.e. I should only see two shades at any specific time frame.
2. Draws a red vertical line on the chart when NSMACD changes color from blue to red on 4H time frame and draws blue vertical line when NSMACD changes color from red to green on a 4H. The vertical lines should not extend outside the chart area and should only be visible in lower time frames in 4H and lower time frames. See the attached photo for clarity - however I do not want to see the lines extend outside the chart area. I should only see 3 vertical lines at any particular time frame.
Related categories: PHP JavaScript Python Software Architecture Metatrader