Days of week on intraday chart by changing the background color

Hello @Tomasz ,

I would like to find a color for a day and another color for the next day when I am in 15-minutes timeframe. I found a similar post and tried to deal with it:

So, I changed the "Minimum spacing (px)" to 200, but the problem is that sometimes it works and sometimes doesn't. For example, in the following picture, it works well:

Now, if I shift the chart a little to the left, it doesn't work:

Could you please help me in this regard?

Best regards,

To draw week days in background you should draw YOUR OWN background, instead of specifying some fixed pixel sizes. Internal grid layout engine is doing lots of effort to keep axis good looking. Having just 1 number in entire X axis looks bad and that is what you would get in second screenshot if there were no finer X ticks. AB prevents that.

As I wrote - draw your OWN background, using either Gfx functions
or plain Plot() function with styleArea.

If you used search before posting:

You would find that your question is already answered:

1 Like

Thank you very much for your explanation @Tomasz

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.