I don't have any programer experience, but i would like to add an background color function to all my indicators, like the one on the MACDBBLinesV4. Simple panel background color change when indicator changes direction.
Question: is it very difficult, specialy for me, to make this add to the indicators?
It is not difficult to add this to any indicator. You will need to
(1) declare color variables in the Variables section of the indicator, something like
(2) introduce a condition specifiying when your background shall be painted at the end of the OnBarUpdate() section, for example
If you use BackColorAll instead of BackColor, all panels of the chart will be colored, with BackColor only the indicator panel will be colored.
(3) If you want the colors to be user selectable you need to serialize the colors. You should define a property for the opacity. This can be done in the Properties Section of the indicator. Best copy the code from another indicator and just change the variables. Opacity should be a value between 0 and 10, so you would declare it as:
The following 8 users say Thank You to Fat Tails for this post:
I want only that the indicator panel to be colored and I thought the same that I need to take first look on a existend indicator. I will to try it first with a Stochastic, because the WMA_colors indicator I use, yeah, I think with that one it will be to much.
I tried now everything but without success, it is to difficult for me.
Maybe someone out there can write a script for me. I wish to have a simple Stochastics with panel background color on the PeriodD and PeriodK crossover.
I maked a screenshot of an example, only on this indicator the Period D linie change it color when it changes direction and I would wish when D and K makes a crossover.
Hopefully some one can help me I would really appreciated it.