Service Elements

External option C# script

Custom code in C# language (for working with options).

Block Parameters

  • Scripts - Select external scripts (Location)

Block Inputs

  • Financial instrument (unlimited number)

Block outputs

No outputs

External C# script

Custom code in C# language

Parameters

  • Scripts - Select external scripts (Location)

Block Inputs

  • Financial instrument (unlimited number)

Block outputs

No outputs

Return value

The block is available in the indicator editor.

Sets the return value of the indicator.

Parameters

Without parameters

Block Inputs

  • Financial instrument (unlimited number), Number, Number (Integer), Boolean value, Two numbers, Cluster, Interactive line, Option, Option series, Single option, Surface, Trading statistics, Last trading statistics

Block outputs

No outputs

Import double values

Returns a Double value, according to the identifier set in the Export values block.

Parameters

  • Identifier

Block Inputs

  • Financial instrument

Block outputs

  • Number

Import bool values

Returns a Boolean value, according to the identifier set in the Export values block.

Parameters

  • Identifier

Block Inputs

  • Financial instrument

Block outputs

  • Boolean value

Import int values

Returns an integer, according to the Identifier set in the Export values block.

Parameters

  • Identifier

Block Inputs

  • Financial instrument

Block outputs

  • Number (Integer)

Source (value, non-streaming)

The block is available in the indicator editor.

A not streaming source of numbers.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Number

Source (value, streaming)

The block is available in the indicator editor.

A streaming source of numbers.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Number

Source (Interactive spline)

The block is available in the indicator editor.

Source - interactive spline. This block represents a graph in the form of a curve passing through the specified points.The received data can be displayed on the canvas panel ("Canvas Panel"). This data type is returned by such blocks as "Prepare a line", "IV Smile", "Smile' of Black-Scholz".

The line's color, thickness, type and its transparency are configured in the scripts’ editor. Each node has such additional settings as the color of the node, the symbol and the size of the symbol in the node. You can attach a tooltip to a node (using a block that forms a line) and a label (permanently visible text).

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

Source (boolean)

The block is available in the indicator editor.

The source of boolean values.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Boolean value

Source (Option series)

The block is available in the indicator editor.

The data source “optional series”. It includes all options of all strikes with one expiration date.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Option series

Source (Position)

The block is available in the indicator editor.

To get the values from the Position block (for example, the Entry price, the number of bars held, etc).

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Position

Commentary

Allows you to write a text comment and link it to any block.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

No outputs

Control panel

The block is available in the script and indicator editor

A panel where you can add control elements that regulate the parameters of blocks’ optimization.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

Not defined

Control message

Displays a control message

Parameters

  • True message - true message

  • False message - false message

  • Message - message

Block Inputs

  • Boolean value

Block outputs

No outputs

Boolean expression

The Boolean Expression block is a custom indicator that has an unlimited number of inputs of the "Number" or "Boolean Value" type. The names of the blocks connected to the "Formula" block are variables. The output value is a "Boolean Value". The syntax of the C# programming language is used to construct logical formulas.

Parameters

  • Expression - Opens the Formula editor window.

  • Begin with - Shows which bar to start the calculation from.

Block Inputs

  • Boolean value and Numbers

Block outputs

  • Boolean value

You can find the available operators and mathematical functions of the language at the following links - C# operators, Mathematical functions built into the C# language.

Examples

Heartbeat 2

Automatic forced recalculation of the script after a specified period of time. The forced recalculation is started via the Recalc() method in the API. By default, protection is enabled so that the recalculation does not start more often than 300ms. You can bypass this in the API by launching the method Recalc(true).

Parameters

  • Interval - interval

Block Inputs

No inputs

Block outputs

No outputs

Not tradable instrument

A non-tradable data source.

Pay attention! Duplication of one tool by several sources is not allowed.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Financial instrument

Not tradable option

Optional non-tradable data source. This includes the underlying asset and all options on it (all series and all strikes).

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Option

Updatable value

A block that allows you to accumulate data on position. After the position is closed, it is reset to zero. A typical application is the implementation of a custom trail-stop. When used without a position, the value will be global.

Parameters

  • Initial - setting the initial value of the block.

  • Do not Clear - Prevents the block from being cleared to the initial value when the position is closed.

  • Execution order - Defines the queue for calculating the Updated value in the algorithm, in the general order (by default), at the end of the algorithm (in the queue of this calculation branch) or after leaving the position.

Block Inputs

  • Number - a new value that is written to the block;

  • Logical value - condition - whether or not we update the numeric value;

  • Cleaning (optional parameter), logical value - brings the updatable value to the starting value.

Block Outputs

  • A current value in the block.

Examples

One to many linked parameters

An analogue of the “Linked parameter” block, but it allows you to transfer the same value to several blocks at once. In the block properties, you must manually define and link the parameters to each other.

Parameters

Detected automatically

Block Inputs

  • Boolean value

  • Number

Block outputs

No outputs

Window

Creates an additional window in the lab where the chart panels can be displayed.

Parameters

Without parameters

Block Inputs

  • Control Panel, Graph

Block outputs

No outputs

Chart pane

Creates a chart panel.

The block is available in the script and chart editor.

Parameters

Without parameters

Block Inputs

  • Number

  • Boolean value

  • Financial instrumen

Block outputs

  • Chart. It can be used with the Window block.

Data Grid Panel

Allows to create a data table. For example, the structure of an option position. The format and name of the columns are edited (in a separate Table Editor).

Parameters

  • Layout

    • Property

      • Format

      • Header

      • Visibility

      • Text alignment

Block Inputs

  • Number

Block Outputs

  • Table. Can be used with the Window block.

Canvas Panel

A panel with the X and Y axes, on which you can output non-time-bound data.

Parameters

Without parameters

Block Inputs

  • Number

Block outputs

  • Chart. It can be used with the Window block.

Recalc Scheduler

Automatic forced recalculation of the script at the specified system time of the computer. Works on a running agent. For large intervals of the main recalculation, do not forget that when changing the parameter, you need to restart the agent or to output the parameter to the control panel, with the recalculation flag, in advance.

Parameters

  • Time - The time, up to a millisecond, when the script will be recalculated.

Block Inputs

  • Financial instrument, Option, Option series

Block outputs

  • Number

Linked parameter

Allows you to link the parameters of different blocks together so that they are not repeated in the optimization list. It is necessary that the parameters should always have the same value.

Parameters

  • Detected automatically

Block Inputs

  • Master - Number, Boolean value

  • Slave - Number, Boolean value

Block outputs

No outputs

Event

During the next recalculation, if the specified event is executed, the Event block will return the value true. This value can be used in the algorithm. The block can be used many times in the editor. The block connects to the source, returns an event for the tool.

Parameters

  • Event type - Event type: None, Order rejected, Order filled, Position opening, Position closing, Order quantity changed, Trading is started, Trading is stopped, Order canceled, Pretrade limitation.

Block Inputs

  • Financial instrumen

Block outputs

  • Boolean value

Message

When the value “true” appears at the input of the block outputs a user message to the program log. You can use label (Tag) in the filters of the Tools - Notification Manager window.

Parameters

  • Message - Message

  • Tag - Additional user tag

  • Importance - The importance of the message (Info, Warning, Error)

Block Inputs

  • Boolean value

Block outputs

No outputs

String expression

String expression - a custom indicator that has an unlimited number of inputs of the "Number" or "Boolean value" type. The names of the blocks connected to the "Formula" block are variables. The output value is " String Value". The syntax of the C# programming language is used to construct logical formulas.

Parameters

  • Expression - Opens the formula editor window

  • Start with - Shows which bar to start the calculation from.

Block Inputs

  • Number, Boolean value

Block outputs

  • String value

Tradable instrument

A tradable data source.

Pay Attention! Duplication of one tool by several sources is not allowed.

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Financial instrumen

Tradable option

An optional tradable data source. This includes the underlying asset and all options on it at once (all series and all strikes).

Parameters

Without parameters

Block Inputs

No inputs

Block outputs

  • Option

Formula

The formula is a custom indicator that has an unlimited number of inputs of the "Number" or "Boolean Value" type. The blocks connected to the "Formula" block are variables. The output value is a "Number". The syntax of the C# programming language is used to construct formulas.

When you type the name of a cube, a list of cubes that match the text you are typing will appear in the formula editor. You can go to the list using the "Down" button, or by clicking the left mouse button directly in the list. The selection of a cube from the list is carried out by pressing the "Enter" button or by double-clicking the mouse. After selecting a cube from the list, the expression is supplemented with the selected cube.

You can find the available operators and mathematical functions of the language at the following links:

Parameters

  • Expression - Opens the Formula editor window.

  • Start with - Shows which bar to start the calculation from.

Block Inputs

  • Number, Boolean value

Block outputs

  • Number

Examples

Timestamp

Time in Unix Time Stamp format with milliseconds https://currentmillis.com/ (Number of milliseconds from 70th year). Feature: the block returns a number without conversions, regardless of the "Local Time" settings in the data provider. The block gives the corresponding UTC time/date in the UTS format on the bar.

Parameters

Without parameters

Block Inputs

  • Financial instrumen

Block outputs

  • Number

Example

11/01/2019 11:16 The local time UTC + 3 in a one-minute period corresponds to 1547205360000, at the close of the bar the number 1547205360000 (Fri Jan 11 2019 11:16:00 UTC).

Export values

Passes the value by the identifier set by the user.

Parameters

  • Identifier

Block Inputs

  • Financial instrumen

  • Number, Boolean value

Block outputs

  • Number

Last updated