Terminal Info
CTerminalInfo
Source code in strategytester5\trade_classes\TerminalInfo.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 | |
are_notifications_enabled
property
Gets whether push notifications are enabled.
build
property
Gets the build number of the client terminal.
code_page
property
Gets the code page of the terminal language.
common_data_path
property
Gets the common data folder of all installed terminals.
community_balance
property
Gets the MQL5.community balance.
company
property
Gets the company name of the client terminal.
cpu_cores
property
Gets the number of CPU cores.
data_path
property
Gets the data folder of the client terminal.
disk_space
property
Gets the free disk space in MB.
is_community_account
property
Gets whether an MQL5.community account is configured.
is_community_connection
property
Gets whether the terminal is connected to the MQL5.community service.
is_connected
property
Gets the information about connection to the trade server.
is_dlls_allowed
property
Gets the information about permission of DLL usage.
is_email_enabled
property
Gets the information about permission to send emails.
is_ftp_enabled
property
Gets the information about permission to send FTP reports.
is_mqid
property
Gets whether a MetaQuotes ID is configured.
is_trade_allowed
property
Gets the information about permission to trade.
is_tradeapi_disabled
property
Gets whether external trade API usage is disabled.
is_valid
property
Returns True if terminal info is available.
is_x64
property
Gets the information about the type of the client terminal.
language
property
Gets the language of the client terminal.
max_bars
property
Gets the maximum number of bars on chart.
memory_available
property
Gets the free memory available for terminal/agent process in MB.
memory_physical
property
Gets the amount of physical memory in MB.
memory_total
property
Gets the total memory available for terminal/agent process in MB.
memory_used
property
Gets the memory used by terminal/agent process in MB.
name
property
Gets the name of the client terminal.
opencl_support
property
Gets the OpenCL version supported by the video card.
path
property
Gets the folder of the client terminal.
ping_last
property
Gets the last ping value.
retransmission
property
Gets the retransmission percentage/value.
__init__(terminal)
A lightweight Python wrapper that resembles the MQL5 Standard Library class
CTerminalInfo and provides convenient, read-only access to the properties
of the MetaTrader 5 terminal environment.
This class caches the result of mt5.terminal_info() at construction time.
The returned values reflect the terminal state at the moment of initialization.
If you need up-to-date values, create a new instance or add a refresh method.
Parameters
terminal : Initialize native MetaTrader5 API or the simulated one from the StrategyTester instance
Raises
RuntimeError If terminal information cannot be retrieved.
Notes
Method groups mirror the MQL5 layout: - Integer / boolean properties: Build, IsConnected, IsDLLsAllowed, IsTradeAllowed, etc. - String properties: Language, Name, Company, Path, DataPath, CommonDataPath - Generic accessors: InfoInteger, InfoString
Source code in strategytester5\trade_classes\TerminalInfo.py
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | |
info_integer(prop_name)
Gets the value of a property of integer type.
Parameters
prop_name : str Name of the terminal info attribute.
Returns
Optional[int] Integer value if present, otherwise None.
Source code in strategytester5\trade_classes\TerminalInfo.py
217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 | |
info_string(prop_name)
Gets the value of a property of string type.
Parameters
prop_name : str Name of the terminal info attribute.
Returns
Optional[str] String value if present, otherwise None.
Source code in strategytester5\trade_classes\TerminalInfo.py
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | |
print_all()
Print all @property values of the class.
Source code in strategytester5\trade_classes\TerminalInfo.py
277 278 279 280 | |
to_dict()
Return all @property values as a dictionary.
Source code in strategytester5\trade_classes\TerminalInfo.py
259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 | |