How to visually identify days of the week on intraday charts? Background color change for each separate day

I consider it pointless to use the code because on intraday chart by default days are colored in different shades if only zoom level makes it aesthetically pleasing1) to do so. It is built-in functionality an it does NOT require ANY code at all.

That is default look of background with 5-minute data. Notice that background of each day is filled with nice gradient of alternate colors.

image

This is controlled by Preferences

image

1) Custom codes like presented in this thread have one big problem: they don't behave correctly with extreme zoom levels. AmiBroker internal axis / background drawing is super-flexible and dynamically adopts to extremes well. Try zooming out intraday chart to multiple years. AmIBroker internal code would present beautiful, clean output with proper X axis and proper background changes that are best looking for given zoom level. Custom drawn "vertical line each day" will not only be slow but also unreadable as lines will be plotted every pixel (or even more frequently), not even mentioning overlapping day names.

2 Likes