Repeater #
The repeater
tool waits for the inner trigger tool to produce a positive
result (an indication that further execution is permitted) and repeats
it for the specified amount of time. Note that when the positive result
of the inner tool is being repeated, the inner tool itself is not executed.
The repeater
tool can be backtested. More information about strategy
backtesting can be found here.
Configuration #
{
"type": "repeater",
"context_id": "repeater-id-123",
"description": "a simple tool",
"trigger": [
{
"type": "placeholder",
"permit": true
}
]
"duration": "1h30m15s"
}
-
type
- string
The type of the tool configuration.Tool configuration types are described in detail here.
-
context_id
- string (optional; default: unused)
The ID of the tool that is used when inserting data into the context store.The context data store and its IDs are described in detail here.
-
description
- string (optional; default: unused)
The description of the tool and its purpose. -
trigger
- array of objects
The array of tools to execute. Exactly one tool must be specified.The trigger tool adheres to the same structuring rules as the top-level tools. These rules are described in detail here.
-
duration
- string (duration)
The amount of time that has to pass for the tool to stop repeating the positive result. It must be a positive value.
Report #
{
"type": "repeater",
"permit": true,
"trigger": [
{
"type":"placeholder",
"permit": true
}
]
"valid_until": "2020-09-10T21:01:20Z"
}
-
type
- string
The type of the tool report.Tool report types are described in detail here.
-
permit
- boolean
The property that determines whether the tool gave its permission to continue strategy execution or not.The tool execution flow is described in detail here.
-
trigger
- array of objects
The array of trigger tool reports. Exactly one report should be expected. Note that if the trigger tool is not executed, this property is not included in the report.The report of the trigger tool adheres to the same structuring rules as the top-level tool reports. These rules are described in detail here.
-
valid_until
- string (RFC 3339)
The exact time when the tool stops repeating the positive result.
If an error occurs during therepeater
tool’s execution, onlytype
anderror
properties are added to the report. Theerror
property is described in detail here.
Context #
The objects that the repeater
tool inserts into the context
store are as follows:
-
tools.<context-id>.permit
- boolean
The object that determines whether the tool gave its permission to continue strategy execution or not. -
tools.<context-id>.valid_until
- string (RFC 3339)
The exact time when the tool stops repeating the positive result. -
tools.<context-id>.triggered
- boolean
The object that determines whether the trigger tool was executed and produced a positive result.
If an error occurs during therepeater
tool’s execution, only thetools.<context-id>.error
object is inserted into the context store. This context data object is described in detail here.