Issue #121: Added original MtTime field to MqlRates (MT5)

This commit is contained in:
vdemydiuk
2018-06-04 15:04:12 +03:00
parent ca3c0e735f
commit 6c45f28a05
3 changed files with 19 additions and 4 deletions
+15
View File
@@ -8,6 +8,20 @@ namespace MtApi5
public MqlRates(DateTime time, double open, double high, double low, double close, long tick_volume, int spread, long real_volume)
{
this.time = time;
mt_time = Mt5TimeConverter.ConvertToMtTime(time);
this.open = open;
this.high = high;
this.low = low;
this.close = close;
this.tick_volume = tick_volume;
this.spread = spread;
this.real_volume = real_volume;
}
internal MqlRates(long time, double open, double high, double low, double close, long tick_volume, int spread, long real_volume)
{
this.time = Mt5TimeConverter.ConvertFromMtTime(time);
mt_time = time;
this.open = open;
this.high = high;
this.low = low;
@@ -22,6 +36,7 @@ namespace MtApi5
}
public DateTime time { get; set; } // Period start time
public long mt_time { get; set; } // Period start time (original MT time)
public double open { get; set; } // Open price
public double high { get; set; } // The highest price of the period
public double low { get; set; } // The lowest price of the period