Circular Candlestick Chart
"Circular Candlestick Chart" by alexgrover, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Circular Candlestick Chart (v1.0), read 2026-10-12T15:54:18.562Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Circular Candlestick Chart by alexgrover, ported from Pine v5. Pane indicator with drawings and 4 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © alexgrover
// ------------------------------------------------------------------------------------------------
// Original author: alexgrover
// Original title: Circular Candlestick Chart
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 5
// Fetched: 2026-10-12
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
indicator("Circular Candlestick Chart", max_lines_count=500)
length = input(25)
width = input(200)
spacing = input(7)
precision = input(10)
//----
upper = ta.highest(length)
lower = ta.lowest(length)
q75 = ta.percentile_linear_interpolation(close, length, 75)
q25 = ta.percentile_linear_interpolation(close, length, 25)
//----
n = bar_index
if barstate.islast
for element in line.all
l = element
line.delete(l[0])
for i = 0 to length - 1
float prev_y = na
int prev_x = na
float prev_cy = na
int prev_cx = na
o = (open[i] - lower) / (upper - lower) * 360
h = (high[i] - lower) / (upper - lower) * 360
l = (low[i] - lower) / (upper - lower) * 360
c = (close[i] - lower) / (upper - lower) * 360
for j = l to h by precision
x = (width - i * spacing) * math.sin(math.toradians(j))
y = (width - i * spacing) * math.cos(math.toradians(j))
line.new(prev_x, prev_y, n + math.round(x), y, color=color.gray)
prev_y := y
prev_x := n + math.round(x)
for k = o to c by precision
x = (width - i * spacing) * math.sin(math.toradians(k))
y = (width - i * spacing) * math.cos(math.toradians(k))
css = close[i] > open[i] ? #26a69a : #ef5350
line.new(prev_cx, prev_cy, n + math.round(x), y, color=css, width=2)
prev_cy := y
prev_cx := n + math.round(x)
q75_deg = (q75 - lower) / (upper - lower) * 360
q25_deg = (q25 - lower) / (upper - lower) * 360
line.new(n, 0, n + math.round(width * math.sin(math.toradians(q75_deg))), width * math.cos(math.toradians(q75_deg)), color=#2157f3, width=1, style=line.style_dotted)
line.new(n, 0, n + math.round(width * math.sin(math.toradians(q25_deg))), width * math.cos(math.toradians(q25_deg)), color=#ff5d00, width=1, style=line.style_dotted)
This file is under the Mozilla Public License 2.0; it is a port of the original by alexgrover, with the original licence header kept and the changes made for FloScript noted in the file.
- v2
Library refresh 2026-10-14
- v1
Library refresh 2026-10-12
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.