Questions from Beginners MQL5 MT5 MetaTrader 5 - page 1130
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Like this
Just my case.
Here's a piece from the example for DRAW_COLOR_HISTOGRAM2 in the handbook:
Here plot_colors = 8, cols[] - array with different colours. But terminal doesn't accept any colours except first.
Do you assign a histogram to the first one? And the colour buffer goes after the second. It should go after the first.
Do you assign a histogram to the first one? And the colour buffer goes after the second. It should go after the first.
Give me an example so I don't have to beat around the bush.
What is the first one? Which second one? Which first? What are we talking about?
Give an example, so as not to beat around the bush.
Formulate your objective. Describe WHAT you want to get out of the indicator.
State your objective. Describe WHAT you want to get out of the indicator.
Are you making fun of it?
https://www.mql5.com/ru/forum/6343/page1129#comment_13439765
Are you kidding me?
https://www.mql5.com/ru/forum/6343/page1129#comment_13439765
That's no good. You're giving fragments of phrases. In such cases, the universal answer is:Documentation.
When you stop pouting and getting offended, formulate what I ask:
Forum on trading, automated trading systems and testing trading strategies
Questions from Beginners MQL5 MT5 MetaTrader 5
Vladimir Karputov, 2019.10.06 06:49
Define your problem. Describe WHAT you want to get from the indicator.
Like this
Exactly my case.
Here is a piece from the example for DRAW_COLOR_HISTOGRAM2 in the handbook:
Here plot_colors = 8, cols[] is array with different colours. But the terminal does not perceive any colours except for the first one.
This is exactly the opposite. This fills in the array of colours to be assigned in this line of code from the documentation
This is no good. You are giving fragments of phrases. In such cases, the universal answer is:Documentation.
When you stop pouting and being offended, formulate what I am asking you to do:
I asked a question, pointed out the problem, gave an example which can even be compiled. If that doesn't work for you, then you have no idea what you're talking about and therefore don't know the answer. In such cases, the universal answer is to learn to read.
When you stop being clever and learn to read and formulate your own questions, the topic will become clear to you.
The ultimate goal: to draw a histogram with each of the given colours.
That's exactly what it's not. It fills in an array of colours to be assigned in this line of code from the documentation
That's right, it's filling in an array of colours. And as I wrote before, the following way (from the example) colours are filled in and specified correctly:
#property indicator_color2 GreenC,RedC
...
Arr23[i]=0.0; //Green
Arr23[i]=1.0; //Red
And with this method:
PlotIndexSetInteger(1,PLOT_LINE_COLOR,0,GreenC;)
PlotIndexSetInteger(1,PLOT_LINE_COLOR,1,RedC);
...
Arr23[i]=0.0; //Green
Arr23[i]=1.0; // Instead of red we get black (i.e. no colour is specified)
To which first? Which second? Which first? What are we talking about?
Give me an example so I don't have to beat around the bush.
One. Second. Three.
You set the first buffer as the colour histogram. What's the second one for? And why does the colour buffer go after the second buffer when it should go after the first. You have a colour buffer of 3. It should be 2.
One. Second. Third.
You set the first buffer to the colour histogram type. What do you need the second one for? And why does the colour buffer go after the second when it should go after the first. You have a colour buffer of 3, and it should be 2.
Artyom, you haven't noticed that the type is DRAW_COLOR_HISTOGRAM2 and it has two data buffers and a third colour buffer.
I asked a question, pointed out the problem, gave an example which can even be compiled. If it does not suit you, then you have no idea what it is about and therefore do not know the answer. In such cases, the universal answer is to learn to read.
When you stop being clever and learn to read and formulate your own questions, the topic will become clear to you.
The ultimate goal: to draw a histogram with each of the given colours.
That's right, it fills in the colour array. And as I wrote before, the following method (from the example) fills the colours and specifies them correctly:
#property indicator_color2 GreenC,RedC
...
Arr23[i]=0.0; //Green
Arr23[i]=1.0; //Red
And with this method:
PlotIndexSetInteger(1,PLOT_LINE_COLOR,0,GreenC);
PlotIndexSetInteger(1,PLOT_LINE_COLOR,1,RedC);
...
Arr23[i]=0.0; //Green
Arr23[i]=1.0; //We get black instead of red (i.e. colour is not specified)
And why is this line commented out?
//#property indicator_color2 GreenC,RedC
Although other colours must be included in it. Or at least one, but there must be a declaration.