This window is available due to this part of an indicator:
#property indicator_buffers 2 #property indicator_color1 clrSkyBlue #property indicator_color2 clrMagenta
This window is available due to this part of an indicator:
Unfortunately, there is no "programmatic" way (at least in pure MQL) to know what the user has selected or changed in the default "Colors" panel of an Indicator.
seriously? o.O so why they even put it there lol
i was really looking to make my indicator bit better this way i guess back to normal extern settings -_-
seriously? o.O so why they even put it there lol
i was really looking to make my indicator bit better this way i guess back to normal extern settings -_-
Seriously??? They put it there, so that the users can change the visual appearance of the indicator, obviously! However, you cannot "programmatically" know if the user chose Orange or Blue, or Thick or Thin, or Solid or Dotted, etc.
You can however, set "extern" or "input" parameters for them and have the user change them from the input parameters, and in this way you will "know" what the user choice is.
Don't use the properties | #property indicator_buffers 2 #property indicator_color1 clrSkyBlue #property indicator_color2 clrMagenta |
Use inputs | #property indicator_buffers 2 input color indicator_color1 = clrSkyBlue; input color indicator_color2 = clrMagenta; int Oninit(){ SetIndexStyle(0, DRAW_LINE, EMPTY, EMPTY , indicator_color1); SetIndexStyle(1, DRAW_LINE, EMPTY, EMPTY , indicator_color2); |
Don't use the properties | |
Use inputs |
Thank you, i added your code however seems it missing something it draw nothing, i thought its black line or something but there was no line in mt4 object list wondering whats going on
WHRoeder only gave you sample code for you to build on. It is up to you to implement and use all of the properties that you wish to use, such as Shape Style, Drawing Style, Line Width, Colour, Arrows, etc.
Read the documentation on all the various functions for a Custom Indicator: https://docs.mql4.com/customind
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
hi guys,
got dilemma with Line, seems fail to fix it
i appreciate any insight on this
i can change color of line if i put it on extern section but its not very good way to change it i like to change as common style set em i mean this
but i don't know how when user for exam chose a color or different pattern grab and change the line with this new settings
i appreciate any insight on this guys thank you in advance