
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 guess if R>G && R>B, it's a red hue.
I need to select from all RGB colours, for example, all colours with red tint. In other words, all colours that are related to red. I know that there are 16.7 million colours. Is there any simple approach to such a task? Thank you.
If by simple, then if R=255 and G<B, the colours will be with red tint.
And if it is complicated, then you can train neuronka on examples demonstrating the desired colour range, and then use the model as a detector of the desired hue)).
for curiosity's sake, I looked up how to do it ...
it's elementary :-)
using a formula to determine that the colour is close to the chosen red and voila :-))
(wikipedia https://ru.wikipedia .org/wiki/Формула_цветового_отличия )
Simply put, if R=255 and G<B, the colours will have a red tint.
You can even check this way with wider coverage:
G < B < R: red tones
B < R == G: yellow
...and so on, not only for the basic three colours, but also for their combinations.
Just ask GPT4o or another new neuron to write a piece of code to determine the shade of red in Python or C++, you'll figure it out from there
I won't paste it here, but the AI did it.
Just ask neuron GPT4o or another new one to write a piece of code to determine the shade of red in python or C++, you'll figure it out from there
I won't paste it here, but the AI did it.
Canvas is cool - but just theoretically!
Why? None of the shown examples are realistic, since you have to check the chart frequently by yourself in the code, actually every tick, since the CHARTEVENT_CHART_CHANGE isn´t fired when the chart changes in many cases. On such case is, when new candles are growing at the very bottom of the chart downwards or at the very top upwards. In that moment and in case you are using CCanvas within the chart area, it all becomes invalid, not one price matches anymore.
And to keep it accurate, you need to use ChartGetInteger or ChartGetDouble for max- or min-price and even other chart-metrics data, every tick. BUT: One single call of that function needs up to thousands of milliseconds. And naturally a bunch of calls take seconds and simply freezes everything.
I don't understand why this thing is still not fixed. Neither the missing events, nor the timing issue. And why, for such fundamentally important stuff like the chart metrics, which you simply need for visual accuracy, why isn´t there a struct with all the metrics data at once at least, when its a fact, that there is timing problem with every single call?
Check this - six years ago, no one cares.
https://www.mql5.com/en/forum/326220
Canvas is cool , but only in theory!
Why? None of the above examples is realistic, because in the code you have to check the chart yourself often, actually every tick, because in many cases CHARTEVENT_CHART_CHANGE is not triggered when the chart changes. One of such cases is the growth of new candles at the very bottom of the chart downwards or at the very top upwards. At this point and in the case of using CCanvas in the chart area, everything becomes invalid, no price matches anymore.
And to maintain accuracy, you need to use ChartGetInteger or ChartGetDouble for max- or min-price and even other chart metric data, every tick. BUT: A single call to this function takes up to a thousand milliseconds. And a bunch of calls naturally takes seconds and just freezes everything.
I don't understand why this thing still hasn't been fixed. Neither the missing events, nor the timing problem. And why for fundamentally important things like graph metrics, which are needed just for visual accuracy, why isn't there a structure with all metrics data at once, if it's a fact that there's a timing problem with every call?
Check this out - six years ago, nobody cares.
https://www.mql5.com/en/forum/326220