Discussion of article "Visualize this! MQL5 graphics library similar to 'plot' of R language" - page 4
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
Good afternoon, how exactly did you try to redraw the chart?
If you just need to change the data for a specific curve, here is an example:
//+------------------------------------------------------------------+
//| Script programme start function|
//+------------------------------------------------------------------+
voidOnStart()
{
//--- data 1
double x1[]={-10,-4,-1,2,3,4,5,6,7,8};
double y1[]={-5,4,-10,23,17,18,-9,13,17,4};
//--- data 2
double x2[]={-10,-10,10,10};
double y2[]={-10,10,-10,10};
//--- graphic
CGraphic graph;
graph.HistoryNameWidth(80);
graph.Create(0,"Graph",0,30,30,830,430);
//--- Points
CCurve *curve=graph.CurveAdd(x1,y1,CURVE_LINES);
graph.CurvePlot(0);
graph.Update();
Sleep(1000);
curve.Update(x2,y2);
graph.Redraw(true);
graph.Update();
Sleep(1000);
}
It is clear in the script, but how to update it in the Expert Advisor? For example, here is a code that creates a random chart on each tick:
I can't figure out how to update the data without deleting the chart. Please tell me who knows how to do it.
Please, if anyone knows how to change font sizes and styles for signatures in this library? - I tried FontSet - it didn't work.....
Please, if anyone knows how to change font sizes and styles for signatures in this library? - I tried FontSet - it didn't work.....
Open the source of the library and in the search type font.
Open the source of the bibla and type font in the search.
Directly shardcode it there? 😁
I just thought there was some ready-made method.
Actually by searching for font I found FontSet but it refuses to co-operate.
Please, if anyone knows how to change font sizes and styles for signatures in this library? - I tried FontSet - it didn't work.....
For captions in the legend?
graphicL.HistorySymbolSize(Point_K);//Get/Set the symbol size of the symbols of the symbolsFor signatures in the legend?
Thank you.
Actually for the axes too.
It is clear in the script, but how to update in the Expert Advisor? For example, here is a code that creates a random chart on each tick:
I can't figure out how to update the data without deleting the chart. Please tell me who knows how to do it.
Any answer ?
Изначально класс CCanvas содержал только два режима отрисовки графических примитивов — со сглаживанием (antialiasing, AA) и без него. Затем были добавлены новые функции для создания примитивов на основе алгоритма Ву:
Methods with smoothing for Arc() and Pie() are missing.
Also need these fill methods with smoothed edges:
//---
Currently, even if you first draw a circle with fill using the FillCircle() method and then trace around it using the CircleWu() method, the smoothing is partially lost.
You also need these smooth edge fill methods:
//---
Currently, even if you first draw a circle with fill using the FillCircle() method and then trace around it using the CircleWu() method, the smoothing is partially lost.
All smoothing methods depend heavily on the opacity of the line. At about 50% opacity, everything becomes unaliased and has artefacts.