Building Strategy Charts with the KLineChart Interface
Summary
This tutorial explains how to use FMZ's KLineChart interface to draw strategy data on custom charts from JavaScript or Python workflows. Its examples focus on JavaScript: create a chart object, process each bar between begin and close calls, and plot volume or indicator values. A Bollinger Bands example places the bands over the price chart and volume in a separate panel, while further examples add horizontal lines, arrows, shapes, text markers, and trade signals.
The guide also introduces chart configuration for visual elements such as grids, candles, axes, tooltips, and annotations. It presents the API as a way to reduce the amount of custom plotting work, with Pine-style drawing functions available through the chart object. The examples demonstrate chart construction rather than trading performance or a strategy edge. Users need to understand their platform's chart API and data handling; the article does not evaluate whether any plotted indicator or signal is profitable.
Key ideas
- KLineChart creates a custom strategy chart that can display price bars and derived data.
- Each bar's drawing operations are enclosed by begin and close calls.
- Bollinger Bands can be plotted over price while volume appears in a separate panel.
- Drawing functions support visual signals, shapes, lines, annotations, and trade markers.
- Chart configuration controls elements such as grids, candles, tooltips, and annotations.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.