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
Hello Luca, try this version 1.46.
If the problem persists, please post the bugs here again.
Thank you for the fast update.
The problem persists but it is related to a different issue, not to your code.
The problem is that in MQL4 I cannot add an indicator programmatically because the command ChartindicatorAdd exists only in MQL5. I can use iCustom but it is useful only to acquire data from the calculation array/buffer inside the indicator.
Probably your iCanvas works flawlessy with MQL5, I cannot test it.
(ref: https://www.mql5.com/en/forum/36119)
By the way thank you for the support!
LucaThank you for the fast update.
The problem persists but it is related to a different issue, not to your code.
The problem is that in MQL4 I cannot add an indicator programmatically because the command ChartindicatorAdd exists only in MQL5. I can use iCustom but it is useful only to acquire data from the calculation array/buffer inside the indicator.
Probably your iCanvas works flawlessy with MQL5, I cannot test it.
(ref: https://www.mql5.com/en/forum/36119)
By the way thank you for the support!
LucaThanks @Nikolai Semko this is great. Easy replacement for many things. Interestingly, the colours don't match the helper in vscode. The blue/red channels are swapped. So to get red on the canvas, vscode shows purple.
This is really strange and this difference exists for two color modes COLOR_FORMAT_ARGB_NORMALIZE and COLOR_FORMAT_XRGB_NOALPHA.
Therefore, I prefer to use the HEX format without the ColorToARGB() function.
Very clear and understandable. Each color R, G, B can take values from 00 to FF (0 to 256)
The first byte is the alpha channel, responsible for transparency.
@Nikolay7ko Is there a secret to make the canvas visible in the tester? Works fine live, but inside the visual tester I don't see it at all.
https://www.mql5.com/en/forum/412168/page63#comment_37046782
@Nikolay7ko Is there a secret to make the canvas visible in the tester? Works fine live, but inside the visual tester I don't see it at all.
Forum on trading, automated trading systems and testing trading strategies
Libraries: Easy Canvas
Nikolai Semko , 2020.11.10 22:51
Highlighted in yellow is what is necessary to reduce the load on the tester
Highlighted in green is what is necessary for the correct drawing of coordinates. Try removing this line and see what happens in the tester.
In this indicator, the screen color changes depending on the direction of price change, the minimum and maximum prices are highlighted on the screen and text information about Bid and Ask is displayed at the current position of the mouse pointer.
But, unfortunately, in the Tester, the mouse movement event is processed only when the left mouse button is pressed.
This applies not only to my iCanvas class, but to any graphical output in the tester.
It’s just easier for me to implement this.
And even the GUI controls work quite normally:
@Nikolai Semko Thanks for the quick reply. It appears that iCanvas isn't returning the correct X and Y values when run inside the tester. I had a look at your code but didn't see anything obvious and didn't go too deep. Any thoughts?
Here is my code:
@Nikolai Semko Thanks for the quick reply. It appears that iCanvas isn't returning the correct X and Y values when run inside the tester. I had a look at your code but didn't see anything obvious and didn't go too deep. Any thoughts?
Here is my code:
In the previous post this was highlighted in green.
if (Canvas.tester) ChartChanged();
https://www.mql5.com/ru/forum/364640/page12#comment_21303258