Change background color in a chart via indicator

 

I'm sure this answer is in the forum somewhere but my searching hasn't come up with anything and then I stumbled across this image https://www.mql5.com/en/forum/11155/page2 whilst looking for something else.
How is this background chart display changed in an indicator? 



Apologies in advance if this question has been answered before, I can't find it.

All about Calendar tab and Macro Economic Events. - Economic Calendar and MML5 Cookbook – Macro Economic Events
All about Calendar tab and Macro Economic Events. - Economic Calendar and MML5 Cookbook – Macro Economic Events
  • 2017.12.12
  • www.mql5.com
All about calendar tab and macro economic events - the key  thread. Mql5 cookbook – economic calendar - the article. ---------------- mql5 reference - economic calendar -  calendarvaluelastbyevent. Example of  economic calendar  events listenter - forum on trading, automated trading systems and testing trading strategies
 
websuburb:

I'm sure this answer is in the forum somewhere but my searching hasn't come up with anything and then I stumbled across this image https://www.mql5.com/en/forum/11155/page2 whilst looking for something else.
How is this background chart display changed in an indicator? 



Apologies in advance if this question has been answered before, I can't find it.

I guess it's one of your indicators on that chart.
 
websuburb:I'm sure this answer is in the forum somewhere but my searching hasn't come up with anything and then I stumbled across this image https://www.mql5.com/en/forum/11155/page2 whilst looking for something else.

How is this background chart display changed in an indicator? Apologies in advance if this question has been answered before, I can't find it.

Its with a graphical object. In this case probably either a Rectangle or Bitmap graphical object.

 
Fernando Carreiro #:

Its with a graphical object. In this case probably either a Rectangle or Bitmap graphical object.

thanks for the insight, this is really helpful. I had thought of this approach and then figured it was a really cumbersome way to add into an indicator so that it changes dynamically when the user scrolls backwards and forwards in the chart, So was hoping that there would be a more efficient way e.g. similar to DRAW_FILLING On reflection, I will try developing an indictor with an artificially high value well above High and a second artificially low value well below the Low and then use DRAW_FILLING to shade the area in between based on the indicator calculation. In this case I wish to reflect a longer term trend as being either bullish or bearish. e.g. if the chart is set to D1 then use a W1 trend indicator.

 
Carl Schreiber #:
I guess it's one of your indicators on tha
Carl Schreiber #:
I guess it's one of your indicators on that chart.

Thanks for the suggestion. Since this is simply a screen shot from an article on an unrelated topic that happened to have a chart effect that I want to use in developing an indicator, I don't see the indicator logic that actually created the effect, hence my question. 

 
websuburb #:

Thanks for the suggestion. Since this is simply a screen shot from an article on an unrelated topic that happened to have a chart effect that I want to use in developing an indicator, I don't see the indicator logic that actually created the effect, hence my question. 

Your reply got me thinking and I think I found the solution here https://www.mql5.com/en/articles/1341

Studying the CCanvas Class. How to Draw Transparent Objects
Studying the CCanvas Class. How to Draw Transparent Objects
  • www.mql5.com
Do you need more than awkward graphics of moving averages? Do you want to draw something more beautiful than a simple filled rectangle in your terminal? Attractive graphics can be drawn in the terminal. This can be implemented through the CСanvas class, which is used for creating custom graphics. With this class you can implement transparency, blend colors and produce the illusion of transparency by means of overlapping and blending colors.
Reason: