I'll add my 5 kopecks)) I'm just starting to learn MQL5, so please excuse me if I'm not explaining it well (:
I have managed to draw 2 indicators Moving Average simultaneously (so called Fast and Slow) in EA code by creating a custom function with ChartIndicatorAdd function (not discussed here yet).
bool AddIndicator() { int subwindow=0; ChartIndicatorAdd(0,subwindow,indicator_handleMA1); ChartIndicatorAdd(0,subwindow,indicator_handleMA2); return(true); }
So, we call this function on EA initialization and everything is drawn, but same problem, I want to paint lines and change thickness without needing to write a separate EA...
2020. The problem is still relevant today. Maybe someone has already solved the issue of colouring not by hand?
Thank you.
I've probably bored everyone with my kanvas by now. But just kanvas really can be a solution to many intractable problems. Even if it's a crutch. For example, we can catch all thrown indicators on a chart, read their buffers and redraw them using a canvas.
For example, something like this can be obtained (timer changes colours):
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
I'll add my 5 kopecks)) I'm just starting to learn MQL5, so please excuse me if I'm not explaining it well (:
I have managed to draw 2 indicators Moving Average simultaneously (so called Fast and Slow) in EA code by creating a custom function with ChartIndicatorAdd function (not discussed here yet).
{
int subwindow=0;
ChartIndicatorAdd(0,subwindow,indicator_handleMA1);
ChartIndicatorAdd(0,subwindow,indicator_handleMA2);
return(true);
}
So, we call this function on EA initialization and everything is drawn, but same problem, I want to paint lines and change thickness without needing to write a separate EA...
2020. The problem is still relevant today. Maybe someone has already solved the issue of colouring not by hand?
Thank you.
2020. The problem is still relevant today. Maybe someone has already solved the issue of colouring not by hand?
Thank you.
I've probably bored everyone with my kanvas by now.
But just kanvas really can be a solution to many intractable problems. Even if it's a crutch.
For example, we can catch all thrown indicators on a chart, read their buffers and redraw them using a canvas.
For example, something like this can be obtained (timer changes colours):