Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 758

 
How do I see the vertical scale of the graph? To change the ellipse when you zoom in vertically.

it's something that doesn't work:

//+------------------------------------------------------------------+
//| Функция получает значение масштаба графика в пунктах на бар.     |
//+------------------------------------------------------------------+
double ChartPointsPerBarGet(const long chart_ID=0)
  {
//--- подготовим переменную для получения результата
   double result=EMPTY_VALUE;
//--- сбросим значение ошибки
   ResetLastError();
//--- получим значение свойства
   if(!ChartGetDouble(chart_ID,CHART_POINTS_PER_BAR,0,result))
     {
      //--- выведем сообщение об ошибке в журнал "Эксперты"
      Print(__FUNCTION__+", Error Code = ",GetLastError());
     }
//--- вернем значение свойства графика
   return(result);
  }
script:
Files:
6maxvt1.mq4  3 kb
 
multiplicator:
is there a circle object? or only an ellipse?
For example code 108, 161, 162, 163 tuta.
 
Alexey Viktorov:
For example code 108, 161, 162, 163 there.
But they can't be enlarged.

And the binding is only on the bottom of the object or on the top.
 
multiplicator:
but they cannot be enlarged.

and the snap is only on the bottom of the object or on the top.

Study CCanvas

Документация по MQL5: Стандартная библиотека / Пользовательская графика
Документация по MQL5: Стандартная библиотека / Пользовательская графика
  • www.mql5.com
Отдельно разработаны классы для создания графических объектов и примитивов, для отрисовки различных видов диаграмм и кривых. Реализованы различные возможности отображения объектов: изменение стиля и цвета линий, заливка, работа с сериями данных на графике и т.д.
 
Artyom Trishkin:

Study CCanvas

or formulas...

objects can be drawn as line segments
here's the same thing when scaling

1

2

 
multiplicator:
but you can't make them larger.

And you can only use the bottom or the top of the object.

Who says you can't?

If they are graphical objects, you can increase the font size, and if they are indicator buffers, you can increase the thickness.

It's done by hand and not diligently enough. You can make them more accurate by software.


 
Artyom Trishkin:

Study CCanvas

something doesn't work

#include <Canvas\Canvas.mqh>
CCanvas can;



void OnStart()
{

int x;
int y;

int count=1;        // сколько копируем


datetime Time[];
ArraySetAsSeries(Time,true);
CopyTime(_Symbol,_Period,0,count,Time);


double Close[];        
ArraySetAsSeries(Close,true);
CopyClose(_Symbol,_Period,0,count,Close);


ChartTimePriceToXY(0,0,Time[0],Close[0],x,y);
  
   
can.FillCircle(x,y,100,ColorToARGB(Red));
   
}
 

Anyway, I made an index on ellipses.

But these ellipses overlap somehow so ugly...

is it possible to avoid this overlapping effect so that all these objects merge into one?



for m1:

Files:
 

Now I need to draw 2 red lines along the top edge of the ellipses and along the bottom edge of the ellipses (as I have shown in the picture).



Does anyone know how to do this?

 
multiplicator:

Now I need to draw 2 red lines along the upper border of the ellipses and along the lower one (as I see in the picture).



Does anyone know how this can be done?

What is it for, in terms of intermediate points between the bars, purely for aesthetics?

I would create a buffer (for the upper and lower channel) for each bar where I would place extrema of all circles on the bar, the window for testing, judging by the figure, would be 10 bars maximum and then I would create this indicator, it is clear that the last bars may overdraw.

Reason: