Autotrading Control Center
The Autotrading Control Center window
An agent is a trading script instance linked to your accounts.
The number of agents created on the basis of one script is unlimited.
The "Autotrading Control Center" window displays the general status of agents, settings, current trading results and tools for starting and stopping agents.
If there are several instruments in the script, only one instrument is displayed in the "Ticker" column, according to the first source in the script (the Source block that was added to the editor first).
You can open this window from the Main Menu | Trading | Autotrading Control Center .
You can apply filters in the table of the Autotrading Control Center window.
Hidden table sorting features: - Sort one column, for example, Ticker. - When sorting the second column, for example, Agent, hold down the Shift button.
Commands
Command | Description |
Add agent | Opens the window for creating and configuring an agent. |
Delete agent | Removes an agent from the list. If the agent is active and has open positions, deleting the agent is impossible. |
Forget errors | The agent stops broadcasting messages about currently existing errors. |
Stop all agents | Stops all agents. |
Edit script | Opens the script on the basis of which the selected agent was created, in the editor. Saving the edited script will restart this agent. |
Context Menu
To open the context menu, right-click on the workspace of the "Autotrading Control Center" window.
Command | Description |
Properties | Opens the properties of the “Autotrading Control Center” window. |
Show on (sheet) | Moves the "Autotrading Control Center" window to one of the existing sheets. |
Clone the window | Duplicates the "Autotrading Control" Centerwindow |
Properties
"Autotrading Control Center" window properties can be opened from the context menu of the window or using the "Properties" button located in the right corner of the window title bar.
Attention! The "Font settings" and "Background color" settings can be returned to the default ones using the "Select default settings" button located to the right of the drop-down menu of this properties. Applying custom settings is indicated by a red indicator on the "Select default settings" button.
Appearance
Property | Description |
Use alternating row colors | Highlighting every second line with an alternate color. |
Background row color | Background color of table rows. |
Font settings | The type and size of font. |
Window caption in floating mode | Shows / Hides the window caption in floating mode (when the selected window is not tied to the main program window). |
Columns caption | Shows / Hides the column captions. |
Columns
Property | Description |
Ticker | Short name of the instrument. The field displaying the ticker contains the "Show Chart" button in the form of a chart. |
Agent | The name of the agent. If the agent has a trade name, it is displayed in brackets. In the field displaying the name of the agent, there are buttons "Agent" (monitor), "General settings" (list) and "Trade settings" (gear). |
Connected | Indication of connection to a trade server. |
Active | Trade availability indication (trading account is active). |
Account | Broker account name. |
Volume of limit | An indication of the amount of funds available for trading for an agent. |
Slippage % | Percentage of permissible slippage. |
Slippage | Absolute value of permissible slippage. |
Positions (lots) | The number of lots operated by a certain instrument that is traded within a certain script. |
Long positions (lots) | The number (in lots equivalent) of long positions currently being managed by the agent. |
Short positions (lots) | The number (in lots equivalent) of short positions currently being managed by the agent. |
Positions (Money) | The volume of funds operated by a certain instrument that is traded within a certain script. |
NP/L | Unrealized profit / loss. |
P/L | Profit / loss. |
P/L (day) | Daily profit / loss. |
Assessed price | Average price of deals of the current open position by instrument. |
Balance price | The price assigned to the stocks for accounting purposes. |
Current | The current price of the instrument, broadcast by the broker. |
Status | The state of the trading session by instrument. |
Commission | Commission paid on the aggregate of transactions made by the agent within the instrument. |
State | The current state of the agent (Started / Stopped), toggled by pressing the button |
Agent settings
You can create a new agent by clicking on the "Add agent" button.
Clicking on the button will open the window for creating and configuring the agent. Two tabs will be available: Common and Trade
Common agent settings
In the Common menu, you can select the required script from the list to connect to the agent, specify the source of trade data, and also specify the limit management type.
After creating an agent, you can open this menu by clicking on the list icon in the Agent column
Column | Description |
Script | Selecting a script from the list to create an agent. |
Trading name (Optional field) | You can give an additional name to the agent for the convenience of tracking processes. This field is optional. |
Limit management type | Selecting a way to manage the funds available to the agent. Possible values: "Managed by agent", "In money equivalent", "In lots", "% of portfolio". Calculating the number of lots in an order: - In lots. The value in the "Volume of limit" field is multiplied by the value in the Position opening block; - Managed by agent. Число в блоке открытия позиции является количество лотов в заявке. The "Volume of limit" field is ignored; - In money equivalent. The value in the "Volume of limit" field is divided by the current instrument price and multiplied by the value in the Position opening block; - % of portfolio. The number in the "Volume of limit" field is multiplied by the amount of money in the account and divided by the current price of the instrument and multiplied by the value in the Position opening block; - Maximum % of portfolio. When placing an order, the amount of free money is determined, and the order is placed without exceeding this amount. (I.e. if there is not enough free money in the portfolio, then securities for a smaller amount will be bought.) |
Volume of limit | The value of the funds limit set in accordance with the method of determining the limit in the "Limit management type" field. |
Sources | Opens the instrument selection window. |
Agent trade settings
The agent Trade settings, as well as the common settings, are available when creating a new agent, the Trade settings window can also be opened by clicking on the gear icon in the Agent column.
Check out the full description of trading settings in the articles:
Agent Trade Settings - Agent Execution
Agent Trading Settings - Placing Orders
Agent Trade Settings - Events
Shortcut buttons
Chart
Opens a Сhart in a separate window with the same instrument and with the same Period as in the agent.
Agent
Shows the Agent chart, Log, Results, Trades, Parameters and Income tabs.
Agent chart
This tab displays the agent's schedule and control panel (if it exists).
Results
Shows the results of the agent. This tab becomes available after starting the agent.
Parameters
The tab is designed to work with the saved values and results of optimization parameters.
Saved parameter sets
"Parameters" tab fields | Description |
Name | The name of the parameter set. |
Date and Time | Date and time of saving the parameter set. |
Ticker | Instruments ticker. |
Note | A comment to a parameter set. |
Profit Factor | Profit Factor. |
Recovery Factor | Recovery Factor. |
List of optimization parameters and its’ values
"Parameters" tab fields | Description |
Optimization Parameters | Blocks list. |
Parameter name | Optimization parameter name. |
Value | Parameter value. |
Results table
Table of results of the optimization parameters.
Commands
"Parameters" tab fields | Description |
Load | Loads previously saved parameters. |
New folder | Creates a new folder in the directory/catalog. |
Delete | Deletes a parameter set or a folder. |
Import | Import of parameter sets previously saved in the script after optimization. |
Export | Export of parameter sets previously saved in the script after optimization.. |
Agent trades
The tab shows a table of trades.
Trades statuses:
Green - normal state of agent operation;
Yellow - there are not submitted/placed orders;
Red - there are mistakes in order execution.
Columns | Description |
Position | Position |
Symbol | Stock’s name. |
Lots | Number of lots in a trade. |
Change / Maximum lots | The number of lots by which the position has changed. |
Execution | |
Entry signal | Entry signal. |
Entry bar | Entry bar. |
Entry date | Entry date. |
Entry time | Entry time. |
Entry price | Entry price. |
Entry commission | Entry commission. |
Exit execution | |
Exit signal | Exit signal. |
Exit bar | Exit bar. |
Exit date | Exit date. |
Exit time | Exit time. |
Exit price | Exit price. |
Exit commission | Exit commission. |
Average entry price | Average entry price. |
P/L | Profit / loss per trade. |
Fixed P/L | Fixed profit / loss. |
Open P/L | Open profit / loss. |
Duration (bars) | The number of bars between entry and exit. |
Profit / bar | Profit / loss per bar. |
Total Profit / Loss | Current profit / loss per position. |
% of change | Percentage change in profit / loss per trade. |
MAE | Maximum adverse excursion. |
MAE % | Maximum adverse excursion in %. |
MFE | Maximum favorable excursion. |
MFE % | Maximum favorable excursion in %. |
Log
Tab showing agent event log.
Profit
Tab showing agent income.
Partial position closing and opening
Partial position closing
If the "Wait for exit" parameter is activated, then the volume of the position closing is added in the amount of the number of candles specified in the parameter. Then the position is closed by the market in the amount of candles specified in the "Automated closing (bars)" parameter.
The number of bars in "Automated closing (bars)" must be more than in the "Wait for exit" parameter. If the value in the "Automated closing (bars)" parameter is less than or equal to "Wait for exit", then the automated closing will not work.
Partial position opening
If the "Wait for entry" parameter is activated, then the volume of the position is added in the amount of the number of candles specified in the parameter. Then the market position is added in the amount of the number of candles specified in the "Automated opening (bars)" parameter.
The number of bars in "Automated opening (bars)" must be more than in "Wait for entry". If the value in the "Automated opening (bars)" parameter is less than or equal to "Wait for entry", then the automated opening will not work.
Agents window statistics
Virtual positions are taken into account in agent management.
Agent management has its own statistics, and there is a possibility of error in it. This is due to the orders for which no response from the broker was received and to the calculation algorithm described below.
It is not yet clear how to eliminate errors. There were suggestions that it is worth removing this information altogether. Modification of the window is required. At the moment, all instruments within one agent are not taken into account and are not shown.
Now in agent management, statistics are calculated as follows: The script breaks all trades into pairs, if there is no pair, then the trades are thrown away. For example, you have 2 lots in a long position, but if you look at the "Trades" table in the agent, then there is no such trade(s). I.e, the script does not actually maintain the position.
In agent management, the generalized position for the script is shown. That is, pressing the "Forget errors" button, skipping an entry, skipping an exit, or automated opening / closing can throw a trade without a pair from statistics.
Agent management statistics do not affect the agent's operation, no special actions are required.
You cannot clear the agent management statistics, you can only start an agent with a new trade name.
Therefore, the statistics of agent management cannot be trusted yet.
Last updated