I am developing a indicator that changes my horizontal lines colors depending on the chart timeframe. I manage to code the whole logic of the indicator using hard coded colors, but, I now want to give the indicator some customizability.
I read a lot on how to use the indicator color properties, discovered that the color sheet is not meant to return a color, rather, be used in buffers and functions.
BUT, I saw some indicators that manage to extract what color parameter the user inputted (On the color sheet) and work with them.
Para login e uso do site MQL5.com, você deve ativar o uso de cookies.
Ative esta opção no seu navegador, caso contrário você não poderá fazer login.
Você entrou na conta. A autenticação de dois fatores foi desativada. Configure-a novamente e escaneie um novo código QR ou continue com a autenticação de dois fatores desativada.
Good morning, fellow traders.
I am developing a indicator that changes my horizontal lines colors depending on the chart timeframe. I manage to code the whole logic of the indicator using hard coded colors, but, I now want to give the indicator some customizability.
I read a lot on how to use the indicator color properties, discovered that the color sheet is not meant to return a color, rather, be used in buffers and functions.
BUT, I saw some indicators that manage to extract what color parameter the user inputted (On the color sheet) and work with them.
I tried this approach on this topic (https://www.mql5.com/en/forum/226236), but its written in MQL4 and won't work on MQL5, and
won't compile, saying its unindentified.
This is the code I used to change the colors
How can I capture the color, width and style from and keep track of it as the user sets other values from (in MQL5)