8#include <pybind11/numpy.h>
188enum class SymbolGTCMode : int32_t { GTC = 0, DAILY = 1, DAILY_NO_STOPS = 2 };
194enum class OptionMode : int32_t { EUROPEAN = 0, AMERICAN = 1 };
209enum class SymbolExecution : int32_t { REQUEST = 0, INSTANT = 1, MARKET = 2, EXCHANGE = 3 };
215enum class DealEntry : int32_t { IN = 0, OUT = 1, INOUT = 2, OUT_BY = 3 };
218enum class OrderTime : int32_t { GTC = 0, DAY = 1, SPECIFIED = 2, SPECIFIED_DAY = 3 };
227enum class CopyTicks : int32_t { ALL = -1, INFO = 1, TRADE = 2 };
241 return static_cast<TickFlag>(
static_cast<int32_t
>(a) |
static_cast<int32_t
>(b));
636#if (defined(_MSVC_LANG) && _MSVC_LANG >= 202302L) || (__cplusplus >= 202302L)
643concept IsScopedEnum = std::is_enum_v<T> && !std::is_convertible_v<T, int>;
650template <IsScopedEnum EnumClass>
652 return static_cast<std::underlying_type_t<EnumClass>
>(a);
Concept to check if a type is a scoped enumeration (Legacy fallback).
Definition objects.hpp:643
Namespace containing MetaTrader 5 (MT5) client definitions and wrapper classes.
Definition metatrader.hpp:24
PositionReason
Reason for position creation.
Definition objects.hpp:224
TradeAction
Types of trade actions in a request.
Definition objects.hpp:127
@ SLTP
Modify Stop Loss / Take Profit.
@ REMOVE
Remove pending order.
@ DEAL
Place a market order (instant execution)
@ MODIFY
Modify pending order price/expiry.
@ PENDING
Place a pending order.
CopyTicks
Flags for copying ticks.
Definition objects.hpp:227
AccountMarginMode
Account margin calculation mode.
Definition objects.hpp:203
TickFlag
Flags describing tick content.
Definition objects.hpp:230
@ VOLUME
Tick changed Volume.
@ ASK
Tick changed Ask price.
OrderFilling
Order filling policies.
Definition objects.hpp:72
@ IOC
Immediate or Cancel: Execute available, cancel remainder.
@ FOK
Fill or Kill: Execute fully or cancel.
@ RETURN
Return: Execute available, keep remainder (standard)
OrderState
States of an order.
Definition objects.hpp:58
@ STARTED
Order checked, but not yet accepted by broker.
@ REQUEST_MODIFY
Order is being modified (internal)
@ FILLED
Order fully executed.
@ REQUEST_ADD
Order is being registered (internal)
@ REJECTED
Order rejected.
@ REQUEST_CANCEL
Order is being deleted (internal)
@ CANCELED
Order canceled by client.
@ PARTIAL
Order partially executed.
Timeframe
Standard chart timeframes.
Definition objects.hpp:20
DealType
Types of deals involved in trading.
Definition objects.hpp:91
@ CHARGE
Additional charge.
@ CORRECTION
Correction deal.
@ COMMISSION_AGENT_MONTHLY
Monthly agent commission.
@ COMMISSION
Commission charge.
@ DIVIDEND
Dividend operation.
@ COMMISSION_AGENT_DAILY
Daily agent commission.
@ COMMISSION_MONTHLY
Monthly commission.
@ SELL_CANCELED
Canceled sell deal.
@ COMMISSION_DAILY
Daily commission.
@ BALANCE
Balance operation.
@ INTEREST
Interest rate charge.
@ CREDIT
Credit operation.
@ DIVIDEND_FRANKED
Franked dividend.
@ BUY_CANCELED
Canceled buy deal.
PositionType
Position type.
Definition objects.hpp:221
SymbolChartMode
Symbol chart price base.
Definition objects.hpp:212
TickFlag operator|(TickFlag a, TickFlag b)
Overload for TickFlag bitwise combination.
Definition objects.hpp:240
DayOfWeek
Days of the week.
Definition objects.hpp:177
AccountStopoutMode
Stop-out calculation mode.
Definition objects.hpp:200
OptionMode
Option style.
Definition objects.hpp:194
TradeRetcode
Return codes from the trade server.
Definition objects.hpp:245
@ NO_CHANGES
No changes in request.
@ TIMEOUT
Request canceled by timeout.
@ FROZEN
Order or position frozen.
@ INVALID_ORDER
Incorrect or prohibited order type.
@ LIMIT_POSITIONS
The number of open positions has reached the limit.
@ ONLY_REAL
Operation is allowed only for live accounts.
@ SHORT_ONLY
The request is rejected, only short positions are allowed.
@ CANCEL
Request canceled by trader.
@ INVALID_CLOSE_VOLUME
A volume to close exceeds the current position volume.
@ CLOSE_ONLY
The request is rejected, only position closing is allowed.
@ INVALID_VOLUME
Invalid volume in the request.
@ REJECT_CANCEL
The pending order is currently being activated, cancel is rejected.
@ FIFO_CLOSE
Position closing is allowed only by FIFO rule.
@ LIMIT_VOLUME
The volume for the symbol has reached the limit.
@ INVALID_FILL
Invalid order filling type.
@ TOO_MANY_REQUESTS
Too many frequent requests.
@ LIMIT_ORDERS
The number of pending orders has reached the limit.
@ PRICE_OFF
There are no quotes to process the request.
@ REJECT
Request rejected.
@ DONE_PARTIAL
Only part of the request completed.
@ ORDER_CHANGED
Order state changed.
@ CLIENT_DISABLES_AT
Autotrading disabled by client terminal.
@ MARKET_CLOSED
Market is closed.
@ PRICE_CHANGED
Prices changed.
@ INVALID_STOPS
Invalid stops in the request.
@ LOCKED
Request locked for processing.
@ CLOSE_ORDER_EXIST
A close order already exists for the specified position.
@ TRADE_DISABLED
Trade is disabled.
@ ERROR
Request processing error.
@ POSITION_CLOSED
Position with the specified ticket is already closed.
@ LONG_ONLY
The request is rejected, only long positions are allowed.
@ INVALID
Invalid request.
@ INVALID_EXPIRATION
Invalid order expiration date in the request.
@ SERVER_DISABLES_AT
Autotrading disabled by server.
@ NO_MONEY
There is not enough money to request.
@ CONNECTION
No connection with the trade server.
@ INVALID_PRICE
Invalid price in the request.
OrderType
Order types for market and pending orders.
Definition objects.hpp:45
@ BUY_LIMIT
Buy Limit pending order.
@ BUY_STOP_LIMIT
Buy Stop Limit pending order.
@ BUY_STOP
Buy Stop pending order.
@ CLOSE_BY
Order to close a position by an opposite one.
@ SELL_STOP_LIMIT
Sell Stop Limit pending order.
@ SELL_LIMIT
Sell Limit pending order.
@ SELL_STOP
Sell Stop pending order.
OptionRight
Option right type.
Definition objects.hpp:191
OrderReason
Reason or source for the order placement.
Definition objects.hpp:80
@ TP
Triggered by Take Profit.
@ SL
Triggered by Stop Loss.
@ SO
Triggered by Stop Out.
@ EXPERT
Placed by Expert Advisor (script)
@ WEB
Placed via web platform.
@ MOBILE
Placed via mobile app.
@ CLIENT
Manually placed by terminal.
AccountTradeMode
Account trade mode (Demo/Real).
Definition objects.hpp:197
constexpr auto operator+(EnumClass a) noexcept
Unary + operator to extract the underlying integer value of a scoped enum.
Definition objects.hpp:651
OrderTime
Order expiration time flags.
Definition objects.hpp:218
SymbolCalcMode
Mode of symbol margin and profit calculation.
Definition objects.hpp:137
@ SERV_COLLATERAL
Collateral.
@ EXCH_OPTIONS
Exchange Options.
@ FOREX_NO_LEVERAGE
Forex without leverage.
@ EXCH_BONDS
Exchange Bonds.
@ EXCH_FUTURES
Exchange Futures.
@ EXCH_STOCKS
Exchange Stocks.
@ CFDINDEX
CFD Index mode.
@ EXCH_STOCKS_MOEX
MOEX Stocks.
@ EXCH_OPTIONS_MARGIN
Exchange Options Margin.
@ CFDLEVERAGE
CFD Leverage mode.
@ EXCH_BONDS_MOEX
MOEX Bonds.
SymbolTradeMode
Allowed trade modes for a symbol.
Definition objects.hpp:155
@ DISABLED
Trading disabled.
@ CLOSEONLY
Only closing allowed.
@ LONGONLY
Long only allowed (Note: likely maps to LONGONLY)
@ SHORTONLY
Short only allowed.
SymbolSwapMode
Swap calculation modes.
Definition objects.hpp:164
@ CURRENCY_DEPOSIT
Swaps in deposit currency.
@ INTEREST_OPEN
Interest open.
@ CURRENCY_MARGIN
Swaps in margin currency.
@ REOPEN_CURRENT
Reopen current.
@ INTEREST_CURRENT
Interest current.
@ CURRENCY_SYMBOL
Swaps in symbol base currency.
DealReason
Reason for the deal execution.
Definition objects.hpp:113
@ VMARGIN
Variation margin.
SymbolType
Asset classes / Symbol types.
Definition objects.hpp:308
@ OPTIONS
Options contracts.
@ COMMODITIES
Commodities.
@ ETFS
Exchange-Traded Funds.
@ STOCKS
Stocks and shares.
@ UNKNOWN
Unknown or unsupported type.
@ CRYPTO
Cryptocurrencies.
ReturnCode
Internal library return codes.
Definition objects.hpp:289
@ INTERNAL_FAIL
Internal Failure.
@ INTERNAL_FAIL_CONNECT
Internal Connection Failure.
@ INVALID_PARAMS
Invalid Parameters.
@ INTERNAL_FAIL_RECEIVE
Internal Receive Failure.
@ UNSUPPORTED
Unsupported Operation.
@ INVALID_VERSION
Version Mismatch.
@ AUTH_FAILED
Authentication Failed.
@ INTERNAL_FAIL_INIT
Internal Initialization Failure.
@ INTERNAL_FAIL_TIMEOUT
Internal Timeout.
@ AUTO_TRADING_DISABLED
AutoTrading Disabled.
@ INTERNAL_FAIL_SEND
Internal Send Failure.
@ NO_MEMORY
Memory Allocation Error.
BookType
Order book entry type.
Definition objects.hpp:206
DealEntry
Deal entry direction.
Definition objects.hpp:215
SymbolGTCMode
Expiration modes for Good-Till-Canceled orders.
Definition objects.hpp:188
SymbolExecution
Symbol execution mode.
Definition objects.hpp:209
Information about the trading account.
Definition objects.hpp:348
double margin_level
Margin level percentage.
Definition objects.hpp:365
double equity
Account equity.
Definition objects.hpp:362
bool trade_allowed
True if trading allowed for account.
Definition objects.hpp:354
std::string currency
Account currency.
Definition objects.hpp:375
double margin_free
Free margin.
Definition objects.hpp:364
bool trade_expert
True if EAs are allowed to trade.
Definition objects.hpp:355
int64_t leverage
Account leverage.
Definition objects.hpp:351
double margin
Used margin.
Definition objects.hpp:363
double profit
Current floating profit.
Definition objects.hpp:361
double assets
Current assets.
Definition objects.hpp:370
double margin_initial
Initial margin requirement.
Definition objects.hpp:368
double credit
Account credit.
Definition objects.hpp:360
int32_t margin_mode
Margin calculation mode (Hedging/Netting)
Definition objects.hpp:356
int32_t currency_digits
Digits of account currency.
Definition objects.hpp:357
int32_t limit_orders
Max allowed pending orders.
Definition objects.hpp:352
double commission_blocked
Blocked commission.
Definition objects.hpp:372
std::string name
Client name.
Definition objects.hpp:373
double margin_so_so
Stop-out level.
Definition objects.hpp:367
int32_t margin_so_mode
Margin stop-out mode.
Definition objects.hpp:353
int32_t trade_mode
Account trade mode (Demo, Real, Contest)
Definition objects.hpp:350
std::string server
Trade server name.
Definition objects.hpp:374
double margin_maintenance
Maintenance margin requirement.
Definition objects.hpp:369
double margin_so_call
Margin call level.
Definition objects.hpp:366
int64_t login
Account login number.
Definition objects.hpp:349
bool fifo_close
True if FIFO closing is required.
Definition objects.hpp:358
double liabilities
Current liabilities.
Definition objects.hpp:371
std::string company
Broker company name.
Definition objects.hpp:376
double balance
Account balance.
Definition objects.hpp:359
Represents an entry in the Depth of Market (Order Book).
Definition objects.hpp:507
uint64_t volume
Volume.
Definition objects.hpp:510
int32_t type
Order type from BookType enumeration.
Definition objects.hpp:508
double volume_real
Volume with greater accuracy.
Definition objects.hpp:511
double price
Price.
Definition objects.hpp:509
Results of an order check (validation) operation.
Definition objects.hpp:536
double equity
Equity after the execution of the deal.
Definition objects.hpp:539
double balance
Balance after the execution of the deal.
Definition objects.hpp:538
double profit
Floating profit.
Definition objects.hpp:540
double margin_free
Free margin.
Definition objects.hpp:542
double margin
Margin requirements.
Definition objects.hpp:541
int32_t retcode
Reply code.
Definition objects.hpp:537
double margin_level
Margin level.
Definition objects.hpp:543
std::string comment
Comment to the reply code (description of the error)
Definition objects.hpp:544
TradeRequest request
The request that was checked.
Definition objects.hpp:545
Results of a sent order.
Definition objects.hpp:549
double volume
Deal volume, confirmed by broker.
Definition objects.hpp:553
double price
Deal price, confirmed by broker.
Definition objects.hpp:554
TradeRequest request
The original request.
Definition objects.hpp:560
int64_t request_id
Request ID set by the terminal during the dispatch.
Definition objects.hpp:558
int32_t retcode
Operation return code.
Definition objects.hpp:550
int32_t retcode_external
Return code of an external trading system.
Definition objects.hpp:559
std::string comment
Broker comment or description of return code.
Definition objects.hpp:557
double ask
Current Ask price.
Definition objects.hpp:556
int64_t deal
Deal ticket, if it is performed.
Definition objects.hpp:551
int64_t order
Order ticket, if it is placed.
Definition objects.hpp:552
double bid
Current Bid price.
Definition objects.hpp:555
Represents a bar of historical data (OHLCV).
Definition objects.hpp:494
uint64_t real_volume
Trade volume.
Definition objects.hpp:502
double close
Close price.
Definition objects.hpp:499
int64_t time
Period start time.
Definition objects.hpp:495
uint64_t tick_volume
Tick volume.
Definition objects.hpp:500
double high
The highest price of the period.
Definition objects.hpp:497
double low
The lowest price of the period.
Definition objects.hpp:498
double open
Open price.
Definition objects.hpp:496
int32_t spread
Spread.
Definition objects.hpp:501
Comprehensive information about a specific financial instrument (Symbol).
Definition objects.hpp:380
double last
Price of the last deal.
Definition objects.hpp:418
double price_greeks_gamma
Option Gamma.
Definition objects.hpp:459
double session_interest
Open interest.
Definition objects.hpp:444
int32_t swap_mode
Swap calculation mode.
Definition objects.hpp:403
double trade_face_value
Face value.
Definition objects.hpp:432
double price_theoretical
Theoretical price.
Definition objects.hpp:456
int32_t trade_mode
Trade mode.
Definition objects.hpp:397
int64_t volumelow
Min volume of the day.
Definition objects.hpp:390
double session_aw
Average weighted session price.
Definition objects.hpp:449
double asklow
Min Ask of the day.
Definition objects.hpp:417
double trade_tick_size
Minimal price change.
Definition objects.hpp:429
double price_greeks_theta
Option Theta.
Definition objects.hpp:458
std::string description
Symbol description.
Definition objects.hpp:470
double price_greeks_rho
Option Rho.
Definition objects.hpp:461
std::string path
Path in symbol tree.
Definition objects.hpp:476
int32_t option_right
Option right (Call/Put)
Definition objects.hpp:411
double session_buy_orders_volume
Volume of buy orders.
Definition objects.hpp:445
double bidhigh
Max Bid of the day.
Definition objects.hpp:413
double bidlow
Min Bid of the day.
Definition objects.hpp:414
double session_turnover
Turnover of the current session.
Definition objects.hpp:443
std::string page
Web page.
Definition objects.hpp:475
double session_price_limit_min
Min price limit.
Definition objects.hpp:451
double session_price_settlement
Settlement price.
Definition objects.hpp:450
int32_t spread
Spread value in points.
Definition objects.hpp:393
double price_volatility
Price volatility.
Definition objects.hpp:455
int32_t digits
Digits after decimal point.
Definition objects.hpp:392
double volumelow_real
Min volume (double)
Definition objects.hpp:423
std::string exchange
Exchange name.
Definition objects.hpp:471
std::string isin
ISIN code.
Definition objects.hpp:473
double session_sell_orders_volume
Volume of sell orders.
Definition objects.hpp:446
double volume_real
Last deal volume (double)
Definition objects.hpp:421
double volume_limit
Max cumulative volume allowed.
Definition objects.hpp:437
double trade_tick_value
Calculated tick value.
Definition objects.hpp:426
double trade_tick_value_profit
Calculated tick value for profit.
Definition objects.hpp:427
int32_t expiration_mode
Flags of allowed order expiration modes.
Definition objects.hpp:406
int64_t session_sell_orders
Number of sell orders in current session.
Definition objects.hpp:387
double option_strike
Option strike price.
Definition objects.hpp:424
double trade_accrued_interest
Accrued interest.
Definition objects.hpp:431
bool spread_float
Is spread floating.
Definition objects.hpp:394
int64_t expiration_time
Symbol expiration date.
Definition objects.hpp:399
int64_t volumehigh
Max volume of the day.
Definition objects.hpp:389
double session_volume
Volume of the current session.
Definition objects.hpp:442
double margin_hedged
Contract size or margin for hedged positions.
Definition objects.hpp:453
double price_sensitivity
Sensitivity.
Definition objects.hpp:463
double volumehigh_real
Max volume (double)
Definition objects.hpp:422
double volume_max
Maximal volume for a deal.
Definition objects.hpp:435
std::string currency_base
Base currency.
Definition objects.hpp:466
double price_greeks_vega
Option Vega.
Definition objects.hpp:460
double ask
Current Ask price.
Definition objects.hpp:415
double price_greeks_omega
Option Omega.
Definition objects.hpp:462
double trade_tick_value_loss
Calculated tick value for loss.
Definition objects.hpp:428
int64_t time
Time of the last quote.
Definition objects.hpp:391
std::string name
Symbol name.
Definition objects.hpp:474
bool custom
Is custom symbol.
Definition objects.hpp:381
int32_t trade_calc_mode
Calculation mode.
Definition objects.hpp:396
int32_t order_gtc_mode
Expiration of Stop Loss and Take Profit.
Definition objects.hpp:409
double price_change
Price change percentage.
Definition objects.hpp:454
double margin_initial
Initial margin requirement.
Definition objects.hpp:440
std::string basis
Underlying asset name.
Definition objects.hpp:464
int64_t session_deals
Number of deals in current session.
Definition objects.hpp:385
double lasthigh
Max Last of the day.
Definition objects.hpp:419
int32_t order_mode
Flags of allowed order types.
Definition objects.hpp:408
int32_t trade_freeze_level
Distance to freeze trade operations.
Definition objects.hpp:401
double lastlow
Min Last of the day.
Definition objects.hpp:420
double bid
Current Bid price.
Definition objects.hpp:412
int32_t trade_exemode
Trade execution mode.
Definition objects.hpp:402
double point
Symbol point value.
Definition objects.hpp:425
std::string currency_margin
Margin currency.
Definition objects.hpp:468
int32_t ticks_bookdepth
Maximal depth of Depth of Market.
Definition objects.hpp:395
double price_greeks_delta
Option Delta.
Definition objects.hpp:457
double volume_step
Minimal volume change step.
Definition objects.hpp:436
int32_t option_mode
Option type.
Definition objects.hpp:410
int64_t volume
Last deal volume.
Definition objects.hpp:388
int32_t filling_mode
Flags of allowed order filling modes.
Definition objects.hpp:407
bool select
Is symbol selected in Market Watch.
Definition objects.hpp:383
bool margin_hedged_use_leg
Calculation of hedged margin using larger leg.
Definition objects.hpp:405
double session_close
Session close price.
Definition objects.hpp:448
std::string currency_profit
Profit currency.
Definition objects.hpp:467
int32_t chart_mode
Price type used for bars generation.
Definition objects.hpp:382
bool visible
Is symbol visible in Market Watch.
Definition objects.hpp:384
int64_t start_time
Symbol trading start date.
Definition objects.hpp:398
double swap_short
Swap for sell positions.
Definition objects.hpp:439
std::string bank
Feeder/Bank name.
Definition objects.hpp:469
double session_open
Session open price.
Definition objects.hpp:447
double trade_contract_size
Trade contract size.
Definition objects.hpp:430
double swap_long
Swap for buy positions.
Definition objects.hpp:438
double volume_min
Minimal volume for a deal.
Definition objects.hpp:434
int64_t session_buy_orders
Number of buy orders in current session.
Definition objects.hpp:386
double session_price_limit_max
Max price limit.
Definition objects.hpp:452
std::string category
Symbol category.
Definition objects.hpp:465
int32_t trade_stops_level
Minimal indention in points for stops.
Definition objects.hpp:400
double askhigh
Max Ask of the day.
Definition objects.hpp:416
double trade_liquidity_rate
Liquidity rate.
Definition objects.hpp:433
int32_t swap_rollover3days
Day of triple swap.
Definition objects.hpp:404
std::string formula
Pricing formula.
Definition objects.hpp:472
double margin_maintenance
Maintenance margin requirement.
Definition objects.hpp:441
Information regarding the terminal and connection status.
Definition objects.hpp:322
std::string company
Broker company name.
Definition objects.hpp:339
std::string name
Terminal name.
Definition objects.hpp:340
std::string commondata_path
Path to common data folder.
Definition objects.hpp:344
std::string path
Path to terminal installation.
Definition objects.hpp:342
int32_t codepage
Codepage number.
Definition objects.hpp:335
std::string data_path
Path to terminal data folder.
Definition objects.hpp:343
bool mqid
MetaQuotes ID availability.
Definition objects.hpp:332
bool ftp_enabled
True if FTP publishing is enabled.
Definition objects.hpp:330
double community_balance
MQL5 community balance.
Definition objects.hpp:337
int32_t maxbars
Max bars on chart.
Definition objects.hpp:334
bool email_enabled
True if email sending is enabled.
Definition objects.hpp:329
bool community_account
True if logged into MQL5 community.
Definition objects.hpp:323
bool connected
True if connected to trade server.
Definition objects.hpp:325
std::string language
Language.
Definition objects.hpp:341
bool dlls_allowed
True if DLLs are allowed.
Definition objects.hpp:326
int32_t build
Terminal build number.
Definition objects.hpp:333
int32_t ping_last
Last ping value in microseconds.
Definition objects.hpp:336
bool notifications_enabled
True if smartphone notifications are enabled.
Definition objects.hpp:331
bool community_connection
True if connected to MQL5 community.
Definition objects.hpp:324
double retransmission
Retransmission percentage.
Definition objects.hpp:338
bool trade_allowed
True if trading is allowed.
Definition objects.hpp:327
bool tradeapi_disabled
True if Trade API is disabled.
Definition objects.hpp:328
Represents a single tick (price update).
Definition objects.hpp:482
int64_t volume
Volume for the current Last price.
Definition objects.hpp:487
uint32_t flags
Tick flags (TickFlag enum)
Definition objects.hpp:489
int64_t time
Time of the last prices update.
Definition objects.hpp:483
int64_t time_msc
Time of a price last update in milliseconds.
Definition objects.hpp:488
double last
Price of the last deal (Last)
Definition objects.hpp:486
double bid
Current Bid price.
Definition objects.hpp:484
double volume_real
Volume for the current Last price with greater accuracy.
Definition objects.hpp:490
double ask
Current Ask price.
Definition objects.hpp:485
Represents a historical deal (execution).
Definition objects.hpp:615
double swap
Swap.
Definition objects.hpp:628
int32_t reason
Reason for deal execution.
Definition objects.hpp:624
int64_t ticket
Deal ticket.
Definition objects.hpp:616
std::string comment
Deal comment.
Definition objects.hpp:632
int64_t time_msc
Deal time in msc.
Definition objects.hpp:619
double commission
Commission.
Definition objects.hpp:627
int32_t entry
Deal entry direction.
Definition objects.hpp:621
double volume
Deal volume.
Definition objects.hpp:625
int64_t time
Deal time.
Definition objects.hpp:618
double price
Deal price.
Definition objects.hpp:626
int64_t order
Order ticket that generated the deal.
Definition objects.hpp:617
int64_t position_id
Position identifier.
Definition objects.hpp:623
std::string external_id
External system ID.
Definition objects.hpp:633
int64_t magic
Expert Advisor ID.
Definition objects.hpp:622
double profit
Profit.
Definition objects.hpp:629
int32_t type
Deal type.
Definition objects.hpp:620
double fee
Fee.
Definition objects.hpp:630
std::string symbol
Symbol name.
Definition objects.hpp:631
Represents an active or historical order.
Definition objects.hpp:564
int32_t reason
Reason for order placement.
Definition objects.hpp:578
double volume_initial
Initial volume.
Definition objects.hpp:579
int64_t position_by_id
Identifier of opposite position.
Definition objects.hpp:577
double price_stoplimit
StopLimit price.
Definition objects.hpp:585
int64_t magic
Expert Advisor ID.
Definition objects.hpp:575
int32_t type_time
Order lifetime.
Definition objects.hpp:572
std::string symbol
Symbol name.
Definition objects.hpp:586
int64_t time_done
Order execution/cancellation time.
Definition objects.hpp:568
int64_t ticket
Order ticket.
Definition objects.hpp:565
double sl
Stop Loss price.
Definition objects.hpp:582
double price_open
Price specified in the order.
Definition objects.hpp:581
int32_t type_filling
Order filling type.
Definition objects.hpp:573
int32_t type
Order type.
Definition objects.hpp:571
int64_t time_done_msc
Order execution/cancellation time in msc.
Definition objects.hpp:569
double tp
Take Profit price.
Definition objects.hpp:583
double volume_current
Current volume.
Definition objects.hpp:580
int64_t time_setup
Order setup time.
Definition objects.hpp:566
int64_t time_expiration
Order expiration time.
Definition objects.hpp:570
std::string external_id
External system ID.
Definition objects.hpp:588
int32_t state
Order state.
Definition objects.hpp:574
int64_t time_setup_msc
Order setup time in msc.
Definition objects.hpp:567
int64_t position_id
Position identifier.
Definition objects.hpp:576
double price_current
Current price of the symbol.
Definition objects.hpp:584
std::string comment
Order comment.
Definition objects.hpp:587
Represents an open position.
Definition objects.hpp:592
int32_t type
Position type.
Definition objects.hpp:598
double price_open
Position open price.
Definition objects.hpp:603
std::string external_id
External system ID.
Definition objects.hpp:611
double price_current
Current symbol price.
Definition objects.hpp:606
int64_t time_update
Position last update time.
Definition objects.hpp:596
int64_t magic
Expert Advisor ID.
Definition objects.hpp:599
double swap
Accumulated swap.
Definition objects.hpp:607
double profit
Current floating profit.
Definition objects.hpp:608
double tp
Take Profit price.
Definition objects.hpp:605
std::string comment
Position comment.
Definition objects.hpp:610
int32_t reason
Reason for position opening.
Definition objects.hpp:601
double sl
Stop Loss price.
Definition objects.hpp:604
int64_t time
Position open time.
Definition objects.hpp:594
int64_t time_msc
Position open time in msc.
Definition objects.hpp:595
std::string symbol
Symbol name.
Definition objects.hpp:609
double volume
Position volume.
Definition objects.hpp:602
int64_t ticket
Position ticket.
Definition objects.hpp:593
int64_t time_update_msc
Position last update time in msc.
Definition objects.hpp:597
int64_t identifier
Position identifier.
Definition objects.hpp:600
Structure to send trade requests to the server.
Definition objects.hpp:515
int64_t deviation
Maximal possible deviation from the requested price.
Definition objects.hpp:525
int64_t order
Order ticket.
Definition objects.hpp:518
int32_t type_time
Order expiration type (OrderTime)
Definition objects.hpp:528
int32_t type
Order type (OrderType)
Definition objects.hpp:526
std::string comment
Order comment.
Definition objects.hpp:530
int32_t type_filling
Order execution type (OrderFilling)
Definition objects.hpp:527
double sl
Stop Loss level of the order.
Definition objects.hpp:523
std::string symbol
Trade symbol.
Definition objects.hpp:519
int64_t position_by
The ticket of an opposite position.
Definition objects.hpp:532
int64_t magic
Expert Advisor ID (magic number)
Definition objects.hpp:517
double price
Price.
Definition objects.hpp:521
int64_t position
Position ticket.
Definition objects.hpp:531
double tp
Take Profit level of the order.
Definition objects.hpp:524
int32_t action
Trade operation type (TradeAction)
Definition objects.hpp:516
double volume
Requested volume for a deal in lots.
Definition objects.hpp:520
double stoplimit
StopLimit level of the order.
Definition objects.hpp:522
int64_t expiration
Order expiration time.
Definition objects.hpp:529