Available translations

Point Formula

foundations.png
point-formula.png
A point formula is a node used to input the [x,y] coordinates of a point.
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.
Point Formula Menu
The Point Formula node has the following Node Menu items:
The Edit menu item has the following properties:
  • action: Edit
  • actionFunction: uiObject.formulaEditor.activate
  • label: Edit
  • iconPathOn: javascript-code
  • iconPathOff: javascript-code
The Delete menu item has the following properties:
  • action: Delete UI Object
  • actionProject: Visual-Scripting
  • askConfirmation: true
  • confirmationLabel: Confirm to Delete
  • actionFunction: payload.executeAction
  • label: Delete
  • iconPathOn: delete-entity
  • iconPathOff: delete-entity
Point Formula Attaching Rules
The following are the Node Attaching Rules that govern the attachment of Point Formula with other nodes:
Compatible Types:
Point Formula Formula
This section explores Point Formula Node Code.
Initial Value
The initial value for Point Formula is:
 "x = record.begin\ny = record.property"
Examples
This is a list of examples used on the Point Formula code, collected from this workspace.