- initialize
- login
- shutdown
- version
- last_error
- account_info
- terminal_info
- symbols_total
- symbols_get
- symbol_info
- symbol_info_tick
- symbol_select
- market_book_add
- market_book_get
- market_book_release
- copy_rates_from
- copy_rates_from_pos
- copy_rates_range
- copy_ticks_from
- copy_ticks_range
- orders_total
- orders_get
- order_calc_margin
- order_calc_profit
- order_check
- order_send
- positions_total
- positions_get
- history_orders_total
- history_orders_get
- history_deals_total
- history_deals_get
order_calc_profit
Return profit in the account currency for a specified trading operation.
order_calc_profit(
|
Parameters
action
[in] Order type may take one of the two ORDER_TYPE enumeration values: ORDER_TYPE_BUY or ORDER_TYPE_SELL. Required unnamed parameter.
symbol
[in] Financial instrument name. Required unnamed parameter.
volume
[in] Trading operation volume. Required unnamed parameter.
price_open
[in] Open price. Required unnamed parameter.
price_close
[in] Close price. Required unnamed parameter.
Return Value
Real value if successful, otherwise None. The error info can be obtained using last_error().
Note
The function allows estimating a trading operation result on the current account and in the current trading environment. The function is similar to OrderCalcProfit.
Example:
import MetaTrader5 as mt5
|
See also