TT CORE SDK 2.0.1.1
TT CORE SDK documentation
Loading...
Searching...
No Matches
RiskSide.h
Go to the documentation of this file.
1/***************************************************************************
2*
3* Unpublished Work Copyright (c) 2019-2021
4* Trading Technologies International, Inc.
5* All Rights Reserved Worldwide
6*
7* * * * S T R I C T L Y P R O P R I E T A R Y * * *
8*
9* WARNING: This program (or document) is unpublished, proprietary property
10* of Trading Technologies International, Inc. and is to be maintained in
11* strict confidence. Unauthorized reproduction, distribution or disclosure
12* of this program (or document), or any program (or document) derived from
13* it is prohibited by State and Federal law, and by local law outside of
14* the U.S.
15*
16****************************************************************************/
17#pragma once
18#include "OrderSide.h"
19
20namespace ttsdk
21{
22 enum class RiskSide
23 {
24 NotSet = 0,
25 Buy = 1,
26 Sell = 2,
27 };
28
29 inline const char* ToString(const RiskSide value)
30 {
31 switch (value)
32 {
33 case RiskSide::Buy:
34 return "Buy";
35 case RiskSide::Sell:
36 return "Sell";
37 default:
38 return "NotSet";
39 }
40 }
41
42 inline RiskSide ToRiskSide(const OrderSide value)
43 {
44 switch (value)
45 {
46 case OrderSide::Buy:
48 return RiskSide::Buy;
49 case OrderSide::Sell:
53 return RiskSide::Sell;
54 default:
55 return RiskSide::NotSet;
56 }
57 }
58}
RiskSide ToRiskSide(const OrderSide value)
Definition RiskSide.h:42
RiskSide
Definition RiskSide.h:23
OrderSide
Definition OrderSide.h:29
const char * ToString(const AccountConnectionStatus::ConnectionStatus status)
Definition connection.h:50
@ NotSet
Definition environment.h:7