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
- It's difficult with zoomo. As there are no scroll bars. And to be honest, I wouldn't want them to be implemented in this class. Right now it only uses CCanvas, and doesn't ask for other objects. And this is very good.
I plan to implement zoom independently by inheritance, put scrollbars and rescale as needed.
Scroll bars are evil. You can spin a normal chart without any bars - with the mouse and the keyboard.
there are no chart events for scrolling. MQL does not send them.
But you can simply dragndrop with the mouse instead of spinning the wheel.
but you can simply dragndrop with the mouse instead of spinning the wheel.
@Roman Konopelko
What about #36?
And found another zero divide
I can clarify (to reproduce)
a CurveAdd(arrY, CURVE_HISTOGRAM, "P/L") curve was added; it has an array arrY of size 1 or 0 elements.
and judging by this curve constructor m_xmax=m_xmin=0.
@Roman Konopelko
What about #36?
And found another zero divide
Implemented #36 and fixed the zero divide error.
The only thing is that ValuesFunctionFormat has not changed to:
void ValuesFunctionFormat(DoubleToStringFunction func, void* cbdata) { m_values_func=func; m_cbdata=cbdata; }
And implemented methods to get/set a pointer to a function and a pointer to an object for it separately:
void ValuesFunctionFormat(DoubleToStringFunction func) { m_values_func=func; }
void *ValuesFunctionFormatCBData(void) const { return(m_values_cbdata); }
void ValuesFunctionFormatCBData(void *cbdata) { m_values_cbdata=cbdata; }
Please fix the colour handling in kanvas.
Now it does not take the alpha channel into account. color instead of uint is everywhere.
Because of this, when drawing on canvas, there are chart gaps everywhere (transparent grids and frames, because in color the alpha channel =0, i.e. completely transparent)
Only in some functions you fixed it by constantly calling ColorToARGB
e.g.
{
...
//--- create background
m_canvas.FillRectangle(0,0,m_width,m_up-1,ColorToARGB(m_background.clr,255));
m_canvas.FillRectangle(0,m_height-m_down+1,m_width,m_height,ColorToARGB(m_background.clr,255));
m_canvas.FillRectangle(0,m_up,m_left-1,m_height-m_down,ColorToARGB(m_background.clr,255));
m_canvas.FillRectangle(m_width-m_right+1,m_up,m_width,m_height-m_down,ColorToARGB(m_background.clr,255));
But why? if you want to make colour a uint type and set it with alpha channel
As here (and in other colour functions)
{
...
//--- sets the default values for grid
m_grid.clr_line=ColorToARGB(clrWhiteSmoke);
m_grid.clr_axis_line=ColorToARGB(clrSilver);
m_grid.clr_frame=ColorToARGB(clrBlack);
m_grid.clr_background=ColorToARGB(clrWhite);
----
PS.
The fact that the canvas itself has COLOR_FORMAT_XRGB_NOALPHA is not important in this case.
decided to check the fixes in terminal update 1502
where are all the improvements made?
No ValuesFunctionFormat, no bug fixes zerodevide
LOL
happy holidays )
installed 1510.
ValuesFunctionFormat is there, it's OK.
--
@Roman Konopelko see sentence #47 please.
In CGraphic code it is just a few variables and functions. The substitution is not difficult.
But it removes the problem of transparency in rendering. Because in color alpha channel =100% transparency, which is wrong.
@Roman Konopelko see sentence #47 please.
There are only a few variables and functions in CGraphic code. The substitution is not difficult.
But it removes the problem of transparency when rendering. In fact, in color alpha channel = 100% transparency, which is wrong.
Also I have added new methods in CCanvas class, which allow to draw primitives with a given thickness:
void LineThickHorizontal(const int x1,const int x2,const int y,const int size,const uint clr,const uint style,ENUM_LINE_END end_style);
void LineThick(const int x1,const int y1,const int x2,const int y2,const int size,const uint clr,const uint style,ENUM_LINE_END end_style);
void PolylineThick(const int &x[],const int &y[],const int size,const uint clr,const uint style,ENUM_LINE_END end_style);
void PolygonThick(const int &x[],const int &y[],const int size,const uint clr,const uint style,ENUM_LINE_END end_style);
int LinesWidth(void) const { return(m_lines_width); }
void LinesEndStyle(ENUM_LINE_END end_style) { m_lines_end_style=end_style; }
void LinesWidth(const int width) { m_lines_width=width; }
Example:
//+------------------------------------------------------------------+
//| Script program start function |
//+------------------------------------------------------------------+
void OnStart()
{
double x[] = { -100, -40, -10, 20, 30, 40, 50, 60, 70, 80, 120 };
double y[] = { -5, 4, -10, 23, 17, 18, -9, 13, 17, 4, 9 };
CGraphic graphic;
graphic.Create(0,"G",0,30,30,780,380);
//--- plot curve
CCurve *curve=graphic.CurveAdd(x,y,CURVE_LINES);
curve.LinesSmooth(true);
curve.LinesStyle(STYLE_DOT);
curve.LinesEndStyle(LINE_END_ROUND);
curve.LinesWidth(10);
graphic.CurvePlotAll();
graphic.Update();
}
The implementation of these methods is based on the Fast Prefiltered Lines algorithm, in which the degree of line smoothness is based on the selected filter. If necessary, I will describe it in more detail.