00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00024 #pragma once
00025
00026 #include <string>
00027 #include <list>
00028
00029 namespace RT
00030 {
00031
00032 const int TICK_SIZE = 1;
00033 const int TICK_LOT = 1;
00034 const double TICK_VALUE = 1;
00035 const double MIN_MARGIN = 2;
00036 const double COMMISION = 1;
00037
00038
00039
00040
00041
00042 class RTInstrument
00043 {
00044 public:
00045
00046 RTInstrument ();
00047
00048 RTInstrument (const RTInstrument &instr);
00049
00050 RTInstrument& operator=(const RTInstrument& rhs) ;
00051
00052
00054 int tick_size () const {return tick_size_ ;}
00055 void tick_size (int tick_size) {tick_size_ = tick_size;}
00056
00058 double tick_value () const {return tick_value_;}
00059 void tick_value (double tick_value) {tick_value_ = tick_value ;}
00060
00062 int round_lot () const {return round_lot_;}
00063 void round_lot (int round_lot) {round_lot_ = round_lot;}
00064
00066 const std::string& currency () const {return currency_ ;}
00067 void currency (const std::string& currency) {currency_ = currency ;}
00068
00070 int numerator() const { return numerator_; }
00071 void numerator(int val) { numerator_ = val; }
00072
00074 int denominator() const { return denominator_; }
00075 void denominator(int val) { denominator_ = val; }
00076
00077 void is_dynamically_created(bool is_dyn_created) { is_dynamically_created_ = is_dyn_created; }
00078
00079
00080 const std::string& symbol () const {return symbol_;}
00081 void symbol (const std::string& val) {symbol_ = val;}
00082
00083
00084 const std::string& sec_id () const {return sec_id_;}
00085 void sec_id (const std::string& val) {sec_id_ = val;}
00086
00087
00088 const std::string& exch_identifier_str() const;
00089 void exch_identifier_str(const std::string& val);
00090
00091
00092 int ets_type() const { return ets_type_; }
00093 void ets_type(int val) { ets_type_ = val; }
00094
00095 protected:
00096
00097 std::string symbol_ ;
00098 std::string sec_id_ ;
00099
00100 int tick_size_;
00101 double tick_value_;
00102 int round_lot_;
00103 std::string optAttribute_;
00104 std::string securityAltID_;
00105 int priceDisplayType_;
00106 int numerator_;
00107 int denominator_;
00108 std::string currency_ ;
00109 int priceRange_;
00110 double min_margin_;
00111 double commission_;
00112 std::string exch_identifier_str_;
00113
00114 bool is_dynamically_created_;
00115 double quoted_in_value_;
00116 int trading_session_;
00117 int ets_type_;
00118 };
00119
00120 }