Page 1 of 1

How to draw circle

PostPosted: Mon May 18, 2015 3:45 am
by Apprentice
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

Re: How to draw circle

PostPosted: Fri Aug 14, 2015 5:05 am
by paololuigi
Hi Apprentice, there is a way to draw a perfect circle without adjust the graphic

Re: How to draw circle

PostPosted: Sun Aug 16, 2015 3:42 am
by Apprentice
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" ... ).