Skip to content

Commit c4fb8ae

Browse files
committed
added interface for tickdate
1 parent bc24598 commit c4fb8ae

3 files changed

Lines changed: 25 additions & 29 deletions

File tree

TickDataImporter/Interface1.cs

Lines changed: 0 additions & 24 deletions
This file was deleted.

TickDataImporter/TickDate.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
namespace TickDataImporter
77
{
8-
internal class TickDate
8+
internal class TickDate : ITickDate
99
{
1010
private string InstrumentID;
1111
private string DateTime;
@@ -73,5 +73,25 @@ public override string ToString()
7373
ExcludeFlag + "," +
7474
UnfilteredPrice.ToString();
7575
}
76+
77+
public string GetSymbol()
78+
{
79+
return InstrumentID;
80+
}
81+
82+
public DateTime GetDateTime()
83+
{
84+
return Convert.ToDateTime(DateTime);
85+
}
86+
87+
public double GetPrice()
88+
{
89+
return Price;
90+
}
91+
92+
public long GetVolume()
93+
{
94+
return Volueme;
95+
}
7696
}
7797
}

TickDataImporter/TickToBarConverter.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,16 @@ public enum IntradayFrequency
1212

1313
internal class TickToBarConverter
1414
{
15-
private List<TickDate> lstTickData;
15+
private List<ITickDate> lstTickData;
1616

1717
private TickToBarConverter() { }
1818

19-
public TickToBarConverter(IEnumerable<TickDate> tickData)
19+
public TickToBarConverter(IEnumerable<ITickDate> tickData)
2020
{
21-
this.lstTickData = (List<TickDate>)tickData;
21+
this.lstTickData = (List<ITickDate>)tickData;
2222
}
2323

24-
public IEnumerable<IBaraData> GetBarData(IntradayFrequency frequency)
24+
public IEnumerable<IBaraDate> GetBarData(IntradayFrequency frequency)
2525
{
2626
throw new NotImplementedException();
2727
}

0 commit comments

Comments
 (0)