Property is automatically created when we create Custom Indicator. Property is not variable.
The SetIndexStyle() function has 5 parameters in it, and all 5 of them need a value or a variable,
voidSetIndexStyle( int index, int type, int style=EMPTY, int width=EMPTY, color clr=CLR_NONE)
the last 3 parameter of SetIndexStyle() already has value
int style=EMPTY, int width=EMPTY, color clr=CLR_NONE
So, It is OK to write SetIndexStyle() with just it's first 2 parameters, like this
SetIndexStyle( 0, DRAW_HISTOGRAM);
However if we want to write SetIndexStyle() with more than 2 of it's parameter, we need to put value, or a variable. and never property to it's other 3 parameters. In your case, since you only want to change it's color, it will be like this :
externcolor My_Cool_1 = Orange;
SetIndexStyle(0,DRAW_HISTOGRAM, 0, 0, My_Cool_1 );
// or you can do this ...SetIndexStyle(0,DRAW_HISTOGRAM, EMPTY, EMPTY, My_Cool_1 );
// or you can do this ...SetIndexStyle(0,DRAW_HISTOGRAM, 1, 1, My_Cool_1 );
// or you can do this ...SetIndexStyle(0,DRAW_HISTOGRAM, 1, 0, My_Cool_1 );
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
My apology for writing "No" that long, I hope you don't get the wrong idea, ... and it's not stupid question like I've told you before.
That could be possible case, however in my case, sometime I don't get that color back on chart so I have to write them as extern input.
Okay this is not working xD Something is missing :P Here's the code:
And all buffers are displayed black when the indicator is loaded, not default colors =(
Ok this
Okay this is not working xD Something is missing :P Here's the code:
And all buffers are displayed black when the indicator is loaded, not default colors =(
This is some properties
Property is automatically created when we create Custom Indicator. Property is not variable.
The SetIndexStyle() function has 5 parameters in it, and all 5 of them need a value or a variable,
the last 3 parameter of SetIndexStyle() already has value
So, It is OK to write SetIndexStyle() with just it's first 2 parameters, like this
However if we want to write SetIndexStyle() with more than 2 of it's parameter, we need to put value, or a variable. and never property to it's other 3 parameters. In your case, since you only want to change it's color, it will be like this :
Whatever it is, put a value or a variable in it.
:)