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
I'm sorry, Pyotr - I'll take it from here. I've already said all I have to say on the subject. I have no desire to repeat myself.
There are no your and my algorithms.
I repeat, the only thing worthy of attention in this thread is this function, from which "your" and "my" algorithms can be derived, the rest is handwashing (both from your side and mine:))
I'm sorry, Pyotr - I'll take it from here. I've already said all I have to say on the subject. I have no desire to repeat myself.
There are no your and my algorithms.
Again, the only thing worthy of attention in this thread is this function from which you can get "your" and "my" algorithms, the rest is handwashing (both from your side and mine :))
Nikolai, I'm all for objectivity. I have attached the script and screenshots.
I know you like to improve your solutions. So do I.
Your algorithm (unfortunately) creates the wrong gradient. I didn't look for the error in it because I don't know how it works. But you can do it.
Nikolai, I'm all for objectivity. I have attached a script and screenshots.
I know you like to improve your solutions. So do I.
Your algorithm (unfortunately) creates the wrong gradient. I didn't look for the error in it because I don't know how it works. But you can do it.
https://www.mql5.com/ru/forum/282861/page7#comment_8971634
https://www.mql5.com/ru/forum/282861/page9#comment_8987611
https://www.mql5.com/ru/forum/282861/page11#comment_8987978
https://www.mql5.com/ru/forum/282861/page19#comment_9019253https://www.mql5.com/ru/forum/282861/page7#comment_8971634
https://www.mql5.com/ru/forum/282861/page9#comment_8987611
https://www.mql5.com/ru/forum/282861/page11#comment_8987978
https://www.mql5.com/ru/forum/282861/page19#comment_9019253Yes, you think your algorithm works correctly because it fits your theory of how it works correctly. I get that.
However, I take the Windows palette as my benchmark. If you compare the output of your algorithm to the palette, the difference is significant. You can see it in the numbers and visually.
That's all I wanted to show.
You may leave it like that. It also looks nice that way.
Yes, you think your algorithm works correctly because it fits your theory of how it works correctly. I get that.
However, I take the Windows palette as my benchmark. If you compare the output of your algorithm to the palette, the difference is significant. You can see it in the numbers and visually.
That's all I wanted to show.
You may leave it like that. It is also beautiful.
You don't see what I'm writing. I don't like the approach I took, which you call my algorithm myself (less evil). But I dislike your approach even more and I have explained why.
you don't see what I'm writing. The approach I took, which you call my algorithm, I don't like myself (less evil). But I dislike your approach even more and I explained why.
Well, then you don't like the Windows palette either. After all, I have an almost complete match with it.
Well, then you don't like the Windows palette either. After all, I have an almost perfect match with it.
I already wrote about that.
And don't confuse palette and gradient. The gradient is one dimensional, the palette is two or three, or four dimensional (if you're talking about CMYK).
For example:
it's a two-dimensional red palette
and this is its one-dimensional gradient.
You're trying to argue about where the junction of the two gradients (from black to colour and from colour to white) is needed. You argue that the variants in the middle are the only correct ones, as they are used in Paint in Windows. In your examples above, where only one colour component appears and the others are 0, yes - it is more correct, but it is only a special case. I'm not asserting anything, I'm just saying that it depends on the task at hand, but I think it is logical to set it in the most general case, depending on the luminosity of the colour (the sum of R+B+G).
For example, in more serious graphics editors, such as those from Corel and Adobe, when it comes to gradient fills, there is a setting for the "center of gravity" of the gradient:
it's a no-brainer argument.
I'm catapulting off this topic.
I'm talking about the colour range. The gradient can be different. But the full range of shades of a single colour is constant.
Each colour has three components - three points on a graph. There are three lines through them. Each line has two segments on the graph. The segments appear from the refraction of light. The axis of refraction is in the centre of the graph. Each segment has a different angle of ascent. The ascent goes from zero to the maximum value. All six segments on the chart represent a prism. Their angles are constant for each range. The task is to find the value of a component in each point of the bars. In this way, I find all shades of one colour. Everything else is derivative manipulation of this solution. You can change the angles of ascent, you can mix colours, and so on. The basis remains the same.
In your solution, the range of shades is either incomplete or distorted. In either case, the transition of shades is not smooth and harmonious.
zy. About the centre of gravity - I agree. But it's just a manipulation of calculating specific points on the graph. You can get more component values in the first segment than in the second. That's how you get a "shifted centre of gravity gradient" (like the example above).
The graph looks something like this:
And to all this, I came by simply observing the behaviour of the numbers in the windows of the Windows palette.