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
Compared these formulas, different results indeed. I also compared the speeds.
The left half is made up of three different colour layers, with 128 transparency everywhere. The colours are mixed by the terminal.
The top right one is made in one layer, blended according to the English wiki.
Bottom right in one layer, according to Russian wiki.
Comparison of terminal and English wiki by screenshot (terminal from above)
Comparing formulas by resources saved to file (English from above)
It takes a lot of time to create a resource, compared to calculating the colour and filling the array up to 10 times, probably no point in dealing with OCL.
PS Seems like a good idea, you can photoshop in MT bang on :)
People who know the CCanvas class, can you tell me if it's possible to create a gradient there? For example, for a rectangle to turn it into a button? I've been wanting to ask that for a long time).
Check.
Are there any examples of buttons drawn with Canvas? I don't recall seeing any. I've seen some very cool buttons, but they were based on source images, and I haven't seen any fully kanvas-drawn ones...
Are there any examples of buttons drawn with Kanawas? I don't recall seeing any. I've seen some very cool buttons, but they were based on source images, and I haven't seen a fully kanvas-drawn one...
Read Anatoly's description of his graph library - about information elements, if my memory serves me correctly.
I'll try to find it...
People who know the CCanvas class, can you tell me if it's possible to create a gradient there? For example, for a rectangle to turn it into a button? I've been wanting to ask that for a long time).
I don't see any problem with the gradient.
Here's a simple clear example of a script that goes through all the colours and draws a changing gradient coloured square dynamically.
Just for it to work, you need to move array m_pixels[] in Canvas.mqh to public
Hi Peter!
I don't see any problem with the gradient.
Here's a simple example of a script that goes through all the colours and draws a gradient coloured square.
Just for it to work, you need to move array m_pixels[] in Canvas.mqh to public
Hi Nikolai!
Thanks for the example, but that's not what I meant. I didn't make my point clearly. I meant the frame of the square, which will turn the square into a button. For that, the lines of the frame need to be different. For example, if top and left lines are light and bottom and right lines are dark, button is pressed, if it is vice versa, button will look pressed. I wanted to know how it can be done with kanvas.
The gradient called the frame lines. Maybe this is wrong...
Hi Nikolai!
Thanks for the example, but that's not what I meant. I didn't make my point clearly. I meant the frame of the square, which will turn the square into a button. For that, the lines of the frame need to be different. For example, if top and left lines are light and bottom and right lines are dark, button is pressed, if it is vice versa, button will look pressed. I wanted to know how it can be done with kanvas.
The gradient called the frame lines. Maybe this is wrong...
The image of the button can be formed either by loading a ready bmp image or using software drawing (there are a lot of variants). And then simply by processing the mouse events in OnChartEvent change its image.