Available translations

Data Mining - Plotters - Shapes

Summary: Shapes define coordinate points to use as vertex for polygons, which are assigned styles.
The shapes node contains definitions of polygons and styles to be rendered on a per-period basis over the charts.
A plotter recursively renders graphics for each period or candle. This means that a definition of what shapes need to be drawn for a single period is required. The plotter does the same thing for every period or candle that is visible on the screen at any point in time, for any time frame, as long as the corresponding data is available.
In general terms, the process of defining what is going to be rendered on the screen consist of the following four steps:
1. Identifying points defined by [x,y] coordinates
2. Defining polygons
3. Defining default styles
4. Defining conditional styles
Foundations->Concept->Reusable Snippets->Note for Hierarchy Tables
Chart Points
Foundations->Node->Chart Points->Definition
A chart points groups definitions of coordinate points used to define polygons.
Foundations->Node->Chart Points->Content
The definition of a point consists of the name of the point and the corresponding values for the x and y coordinates. To create such definitions, point and point formulas are used.
Foundations->Concept->Reusable Snippets->Note for Hierarchy Tables
A point is a definition of an [x,y] coordinate. The value [x] usually represents a datetime. The value [y] may refer to a price or some other concept.
These coordinate points are used to define polygons. Values for [x,y]coordinates are entered with a point formula.
Point Formula
Foundations->Node->Point Formula->Definition
A point formula is a node used to input the [x,y] coordinates of a point.
Foundations->Node->Point Formula->Content
To represent some form of variation of the price or a price derivative over time, a typical point formula consists of the following two coordinates:
  • x = datetime and
  • y = rate.
For example
Point SMA 20 Begin
 x = record.begin
y = record.previous.sma20
The example above shows the definition of the first of two points necessary to draw the segment of the 20-periods SMA curve for any particular period or candle. In this case, x = record.begin is the starting datetime of the period and y = record.previous.sma20 is the rate of the 20-periods SMA of the previous period.
To complete the line segment corresponding to a single period, the closing datetime of the period and the closing rate for the 20-periods SMA are required:
Point SMA 20 End
 x = record.end
y = record.sma20
The above system works very well for plotting all sorts of information over the candles, on the charts.
An oscillator like RSI too needs the definition of the starting and ending datetime of the period as the value for the x-axis. However, the value for axis y fits a different scale.
Anyway, the points definition is just as straight forward, for example:
Point RSI Begin
 x = record.begin
y = record.previous.value
Point RSI End
 x = record.end
y = record.value
Points do not necessarily need to refer to values on the dataset produced by the corresponding data product. For example, absolute values for the y-axis may be used to describe fixed graphical elements, for instance, a horizontal line, or a box.
Point Begin 20
 x = record.begin
y = 20
Point End 20
 x = record.end
y = 20
Point Begin 30
 x = record.begin
y = 30
Point End 30
 x = record.end
y = 30
The above four points are used to paint the background of the 20 to 30 value range of the RSI chart. The first two points are also used to draw the dotted line signaling the 20-value mark, and the last two are used for the dotted line indicating the 30-value mark.
A polygon features definitions that makeup shapes and their styles.
Polygons are defined by two or more vertices, which map points in a charts point. The graphic representation of polygons originates in styles applied to either or both polygon bodies and polygon borders.
Foundations->Concept->Reusable Snippets->Note for Hierarchy Tables
Polygon Condition
Foundations->Node->Polygon Condition->Definition
A polygon condition is a rule that allows establishing when a polygon shall be rendered and when not.
Foundations->Node->Polygon Condition->Content
The node is optional. When the node is not present in the definition of the polygon or when the condition validates true, the polygon is rendered on screen. When the condition validates false the polygon is not rendered. As such, the node allows dynamically switching the rendering of the corresponding polygon on and off.
Polygon Body
Foundations->Node->Polygon Body->Definition
A polygon body is the fill of a shape made out of at least three vertices.
Foundations->Node->Polygon Body->Content
A polygon body needs at least three vertices to be defined. A body serves to create a fill for the outlines of any sort of polygon, either closed or open, by giving it a style.
A style is a definition of color and opacity in case of a polygon body, and color, opacity and line thickness in case of polygon borders.
A style applied to a polygon body or a polygon border node acts as the default style. Styles including colors, opacity, line width, and more, are defined in the node's configuration.
Style Condition
Foundations->Node->Style Condition->Definition
A style condition is a rule that allows applying an alternative style in cases where the rule validates true.
Foundations->Node->Style Condition->Content
Style conditions offer a way to introduce additional intelligence on the visual representation of data by using styles that respond to certain conditions.
For example, the Percentage Bandwidth plotter module assigns a different color to the Moving Average line when it's going up or down.
To do that, a style condition features it's own style so that, when the condition validates true, the new style is applied.
Style conditions me be created in a sequence so that the style may continue changing upon the validation of a series of style conditions. The system evaluates all style conditions in a sequential order determined by their position in the rotational symmetry around the parent node. Each condition that is met may modify or add up to the resulting style that is rendered on screen. That is, the final style is the result of the sequential application of the styles defined for each condition that is met, on top of the default style.
Polygon Border
Foundations->Node->Polygon Border->Definition
A polygon border is a shape defined by at least two vertices used to draw lines or to apply a style to the stroke of a closed shape.
Foundations->Node->Polygon Border->Content
A polygon border needs at least two vertices to be defined. A border serves to create a stroke for the outlines of any sort of polygon, either closed or open, by giving it a style.
Polygon Vertex
Foundations->Node->Polygon Vertex->Definition
A polygon vertex is a reference to a point defined in the chart points, constituting a specific coordinate to be used as a vertex of a shape.
Foundations->Node->Polygon Vertex->Content
Vertices are the main element defining polygons. Once created, each vertex must establish a reference to the corresponding point in the charts point.
Drawing curves requires two vertices. Painting areas, such as the background of a chart, likely requires four vertices. Note that vertices are not capable of featuring a style. Instead, styles are applied to polygon borders and polygon bodies.
Data Mining - Plotters
Data Mining - How to Build an Indicator - Video Series