algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
Loading...
Searching...
No Matches
algotradelib::Money Struct Reference

An exact amount of money in one currency. More...

#include <algotradelib/src/core/types.hpp>

Collaboration diagram for algotradelib::Money:

Public Attributes

Decimal64 amount_
 The amount.
Currency currency_
 The currency; the library never adds amounts in different currencies.

Friends

bool operator== (const Money &lhs, const Money &rhs)
 Compares amount (with Decimal64::operator==) and currency.

Detailed Description

An exact amount of money in one currency.

Definition at line 895 of file types.hpp.

◆ operator==

bool operator== ( const Money & lhs,
const Money & rhs )
friend

Compares amount (with Decimal64::operator==) and currency.

Parameters
lhsThe first amount.
rhsThe second amount.
Returns
true if both are equal.

Definition at line 907 of file types.hpp.

Member Data Documentation

◆ amount_

◆ currency_

Currency algotradelib::Money::currency_

The currency; the library never adds amounts in different currencies.

Definition at line 899 of file types.hpp.

Referenced by algotradelib::runner::ChargedCosts::add(), operator==, and algotradelib::runner::Runner< Strategy, CapsType, Tag, Executor >::set_portfolio_value().


The documentation for this struct was generated from the following file: