Download MetaTrader 5

How to Draw a circle ?

To add comments, please log in or register
Make profit on MQL5 services. It's easy!
okwh 2006.12.07 10:45 
How to Draw a circle ?
ObjectCreat() not good since it always draw ELLIPSE, I want to draw a circle with a line linke two points. but in MT, it draw ELLIPSE since different X/Y scale( Y is price, X is time, they are never same scale, but I want draw circle whenever axes change).

I want use one 2 coordinates, one parater is center point and another circle radius,
and circle radius is calculated based both the price and bar.
In other point, need consider time and price both.

about Fibonacci Arcs .......these arcs meeting the trendline at Fibonacci levels of 38.2%, 50%, and 61.8%.
How is it be drawn? X-diff on Xaxes and y-diff on Yaxes and trendline length?


another ,what is "scale object property"?

OBJPROP_SCALE 12 double Double value to set/get scale object property.

okwh 2006.12.15 03:32  
Oh, no one know?

then ask in other mode:

In MT, Draw a circle or Ellips can be use three mode ,one is use ObjectCreate() to draw OBJ_CYCLES, another is use ObjectCreate() to draw OBJ_ELLIPSE, and third is use ObjectCreate() to draw OBJ_FIBOARC with OBJPROP_ELLIPSE.

We know only two coordinates can now to draw a ELLIPSE !!!

Who know MT how to draw a Ellips with only two coordinates?

And Another question: how to use time coordinate to get the price coordinate value on the OBJ_FIBOARC
EvgeniX 2008.06.18 09:14  
no one know?
Slawa 2008.06.18 10:46  

Ellipse is determined with 2 lines - big radius and small radius.

2 points determine big radius (or rather double radius from center to one point and from center to another point ie diameter line). Big line is measured as x-axis in time units.

Small line is measured as y-axis in points.

Scale is the relation between big line time units and small line price units.

Set your chart for fixed 1:1 scale. It means 1 logical time unit contains as much physical pixels as 1 logical price unit. If you set ellipse scale as 1.0, then you get a regular circle

Ray 2008.06.18 16:07  

Setting 1:1 is nice...

In future, consider permitting user to specify X:1

1:1 can be useless on some instruments except in smallest timeframe.

EvgeniX 2008.06.19 08:07  

Maybe you can help me with formulas for radius? depending from scale?

Im looking for 2 coardinates to use OBJ_ELLIPSE for Arc. insted of OBJ_FIBOARC.

EvgeniX 2008.06.20 03:39  
any one? please
GregorAnton 2015.03.22 09:14  
Here is a handy indicator for drawing a circle on the fly, without having to size it.  The script automatically sizes the circle (ellipse).
To add comments, please log in or register