How to draw circle

Moderator: admin

How to draw circle

Postby Apprentice » Mon May 18, 2015 3:45 am

How to draw circle.png

This is a simple example of how you can draw a circle via Draw function.
The circle is defined by two points.
The closing price of last candle.
The closing price N period ago.
How to draw circle.lua
(3.48 KiB) Downloaded 1753 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: How to draw circle

Postby paololuigi » Fri Aug 14, 2015 5:05 am

Hi Apprentice, there is a way to draw a perfect circle without adjust the graphic
paololuigi
 
Posts: 15
Joined: Tue Sep 09, 2014 5:22 am

Re: How to draw circle

Postby Apprentice » Sun Aug 16, 2015 3:42 am

Code: Select all
local font;
local Size=10;
function Prepare()   
font = core.host:execute("createFont", "Wingdings", Size, false, false);
end

function Update(period)
core.host:execute("drawLabel1", 1, source:date(period), core.CR_CHART, source[perice], core.CR_CHART, core.H_Center, core.V_Top, font, core.rgb(0, 255, 255), "\108");
end
 
function ReleaseInstance()
       core.host:execute("deleteFont", font);
end


You can use core.host:execute("drawLabel1" ... ).
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 12 guests