I updated the title of your question to include the full context of your request. This will also help others to locate this topic using the search function. And there was a typo in your original title, the correct spelling for the time frame is "Daily", not "Dailey".
Since this solution is intended to suite the needs of a wide variety of traders I have included a user input to set the "number of bars" used to trigger the change in background color. This allows users to apply this on any time frame they like and adjust the number of bars to suite their needs. I have also included the ability to change which background color is used. Some traders use a white background already so they need to be able to adjust that without modifying the code. You will find the color adjustment listed in the "Globals" section of the Edit Studies window.
Another item to note, it is possible to trick this chart study into changing the background color for stocks which have been around for ages. So users should be careful to note how many historical bars their charts are set to include in the viewable area of the chart. This chart study is only able to read the data that is included in the chart. For example if you have a chart of AAPL displaying 3 months of daily bars your chart will have less than 100 bars and trigger this background color change (using the default values of this chart study).
Here is the code to create your custom chart study:
input numberOfBars = 100;
DefineGlobalColor("background", Color.WHITE);
def barsOnChart = HighestAll(BarNumber());
AssignBackgroundColor(if barsOnChart < numberOfBars then GlobalColor("background") else Color.CURRENT);