Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
208
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.02 KB | None | 0 0
  1. #include "../Infrastructure/Object.mqh";
  2.  
  3. //+------------------------------------------------------------------+
  4. //|                           Свеча                                  |
  5. //+------------------------------------------------------------------+
  6. class Candle : public Object
  7. {
  8.     private:
  9.         double OpenPrice;
  10.         double ClosePrice;
  11.         double HighPrice;
  12.         double LowPrice;
  13.         datetime Date;
  14.         ulong Volume;
  15.         long Timestamp;
  16.  
  17.     public:
  18.         void Candle() {}
  19.         void Candle(const Candle &obj) {
  20.             this = obj;
  21.         }
  22.         void setOpenPrice(double openPrice)
  23.         {
  24.             this.OpenPrice = openPrice;
  25.         }
  26.        
  27.         double getOpenPrice()
  28.         {
  29.             return this.OpenPrice;
  30.         }
  31.        
  32.         void setClosePrice(double closePrice)
  33.         {
  34.             this.ClosePrice = closePrice;
  35.         }
  36.        
  37.         double getClosePrice()
  38.         {
  39.             return this.ClosePrice;
  40.         }
  41.        
  42.         void setHighPrice(double highPrice)
  43.         {
  44.             this.HighPrice = highPrice;
  45.         }
  46.        
  47.         double getHighPrice()
  48.         {
  49.             return this.HighPrice;
  50.         }
  51.        
  52.         void setLowPrice(double lowPrice)
  53.         {
  54.             this.LowPrice = lowPrice;
  55.         }
  56.        
  57.         double getLowPrice()
  58.         {
  59.             return this.LowPrice;
  60.         }
  61.        
  62.         void setDate(datetime date)
  63.         {
  64.             this.Date = date;
  65.         }
  66.        
  67.         datetime getDate()
  68.         {
  69.             return this.Date;
  70.         }
  71.        
  72.         void setVolume(ulong volume)
  73.         {
  74.             this.Volume = volume;
  75.         }
  76.        
  77.         ulong getVolume()
  78.         {
  79.             return this.Volume;
  80.         }
  81.        
  82.         void setTimestamp(long timestamp)
  83.         {
  84.             this.Timestamp = timestamp;
  85.         }
  86.        
  87.         long getTimestamp()
  88.         {
  89.             return this.Timestamp;
  90.         }
  91. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement