Files
Superalgos/docs/_includes/data_mine/point-formula.md
T

5.1 KiB

{% assign title = "Point Formula" %} {% assign definition = site.data.data_mine.point_formula %} {% assign preposition = "a" %} {% assign plural = "s" %}

{% if include.more == "yes" and include.heading == "more" %}

Click to learn more about {{ title | downcase }}{{plural}} {% endif %}

{% if include.heading != "" and include.heading != "more" %} {{include.heading}} {{title}} {% endif %}

{% if include.icon != "no" %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% endif %}

{% if include.definition == "bold" %} {{ definition }} {% else %} {% if include.definition != "no" %} {{ definition }} {% endif %} {% endif %}

{% if include.table == "yes" and include.icon != "no" %}

{% endif %}

{% if include.more == "yes" and include.content == "more" and include.heading != "more" %}

Click to learn more about {{ title | downcase }}{{plural}} {% endif %}

{% if include.content != "no" %}

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.

{% include note.html content="The above variables are constructed with information originating at the product definition that references the corresponding plotter module." %}

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.

{% include note.html content="The reason from separating the definition of points from the definition of polygons is that any point may be used by one or more polygons." %}

{% endif %}

{% if include.more == "yes" and include.content != "more" and include.heading != "more" %}

Click to learn more about {{ title | downcase }}{{plural}} {% endif %}

{% if include.adding != "" %}

{{include.adding}} Adding {{preposition}} {{title}} Node

To add a point formula, select Add Point Formula on the point node menu.

{% endif %}

{% if include.configuring != "" %}

{{include.configuring}} Configuring the {{title}}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

{% endif %}

{% if include.starting != "" %}

{{include.starting}} Starting {{preposition}} {{title}}

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

{% endif %}

{% if include.more == "yes" %}

{% endif %}