use of org.ta4j.core.BaseBar in project ta4j by ta4j.
the class CsvTradesLoader method buildBars.
/**
* Builds a list of populated bars from csv data.
* @param beginTime the begin time of the whole period
* @param endTime the end time of the whole period
* @param duration the bar duration (in seconds)
* @param lines the csv data returned by CSVReader.readAll()
* @return the list of populated bars
*/
private static List<Bar> buildBars(ZonedDateTime beginTime, ZonedDateTime endTime, int duration, List<String[]> lines) {
List<Bar> bars = new ArrayList<>();
Duration barDuration = Duration.ofSeconds(duration);
ZonedDateTime barEndTime = beginTime;
// line number of trade data
int i = 0;
do {
// build a bar
barEndTime = barEndTime.plus(barDuration);
Bar bar = new BaseBar(barDuration, barEndTime);
do {
// get a trade
String[] tradeLine = lines.get(i);
ZonedDateTime tradeTimeStamp = ZonedDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(tradeLine[0]) * 1000), ZoneId.systemDefault());
// if the trade happened during the bar
if (bar.inPeriod(tradeTimeStamp)) {
// add the trade to the bar
double tradePrice = Double.parseDouble(tradeLine[1]);
double tradeAmount = Double.parseDouble(tradeLine[2]);
bar.addTrade(tradeAmount, tradePrice);
} else {
// this break will drop us after the inner "while", skipping the increment
break;
}
i++;
} while (i < lines.size());
// this is where the break drops to
if (bar.getTrades() > 0) {
bars.add(bar);
}
} while (barEndTime.isBefore(endTime));
return bars;
}
use of org.ta4j.core.BaseBar in project ta4j by ta4j.
the class PreviousValueIndicatorTest method setUp.
@Before
public void setUp() {
Random r = new Random();
List<Bar> bars = new ArrayList<>();
for (int i = 0; i < 1000; i++) {
double open = r.nextDouble();
double close = r.nextDouble();
double max = Math.max(close + r.nextDouble(), open + r.nextDouble());
double min = Math.min(0, Math.min(close - r.nextDouble(), open - r.nextDouble()));
ZonedDateTime dateTime = ZonedDateTime.now();
Bar bar = new BaseBar(dateTime, open, close, max, min, i);
bars.add(bar);
}
this.series = new BaseTimeSeries("test", bars);
this.openPriceIndicator = new OpenPriceIndicator(this.series);
this.minPriceIndicator = new MinPriceIndicator(this.series);
this.maxPriceIndicator = new MaxPriceIndicator(this.series);
this.volumeIndicator = new VolumeIndicator(this.series);
ClosePriceIndicator closePriceIndicator = new ClosePriceIndicator(this.series);
this.emaIndicator = new EMAIndicator(closePriceIndicator, 20);
}
use of org.ta4j.core.BaseBar in project ta4j by ta4j.
the class AroonOscillatorIndicatorTest method init.
@Before
public void init() {
// fb_daily, 2017/01/03 - 2017/08/18
String rawData = // date, close, volume, open, high, low
"2017/08/18,167.4100,15065590.0000,166.8400,168.6700,166.2100\n" + "2017/08/17,166.9100,17009420.0000,169.3400,169.8600,166.8500\n" + "2017/08/16,170.0000,15732840.0000,171.2500,171.3800,169.2400\n" + "2017/08/15,171.0000,8713651.0000,171.4900,171.5000,170.0100\n" + "2017/08/14,170.7500,12940140.0000,170.0900,171.0800,169.2900\n" + "2017/08/11,168.0800,13778190.0000,167.9500,168.8200,166.8500\n" + "2017/08/10,167.4000,20551720.0000,170.0600,170.5900,166.8500\n" + "2017/08/09,171.1800,10800730.0000,169.9800,171.4500,169.5600\n" + "2017/08/08,171.2300,14317200.0000,171.8800,173.0500,170.6200\n" + "2017/08/07,171.9800,12765230.0000,169.9500,172.0600,169.6600\n" + "2017/08/04,169.6200,10505980.0000,168.9700,170.0600,168.6900\n" + "2017/08/03,168.5900,10519470.0000,169.3000,169.7000,168.2500\n" + "2017/08/02,169.3000,17181110.0000,170.3000,170.5500,166.9100\n" + "2017/08/01,169.8600,14286110.0000,169.8200,170.4700,169.0500\n" + "2017/07/31,169.2500,25429310.0000,172.0000,172.7200,168.5500\n" + "2017/07/28,172.4500,24546680.0000,169.0700,173.4300,169.0500\n" + "2017/07/27,170.4400,68454830.0000,174.7000,175.4900,167.5000\n" + "2017/07/26,165.6100,32989200.0000,166.0100,166.0100,164.1000\n" + "2017/07/25,165.2800,15309000.0000,165.0100,165.5400,163.8619\n" + "2017/07/24,166.0000,17208500.0000,164.6400,166.1700,164.3100\n" + "2017/07/21,164.4300,14712450.0000,164.1600,165.0500,163.7500\n" + "2017/07/20,164.5300,18409730.0000,164.8000,165.0000,162.8100\n" + "2017/07/19,164.1400,26144510.0000,163.5900,165.7000,163.1700\n" + "2017/07/18,162.8600,23686800.0000,159.6600,163.7300,159.4200\n" + "2017/07/17,159.7300,12757430.0000,160.2500,160.7800,158.8100\n" + "2017/07/14,159.9700,16305570.0000,160.1300,160.3200,159.3254\n" + "2017/07/13,159.2600,13912150.0000,158.7400,159.7800,158.4227\n" + "2017/07/12,158.9000,22710090.0000,156.4900,159.1600,156.2000\n" + "2017/07/11,155.2700,13652540.0000,153.3700,155.4225,152.9100\n" + "2017/07/10,153.5000,13326410.0000,151.6900,153.9800,151.5100\n" + "2017/07/07,151.4400,13249750.0000,149.2500,151.9900,149.1900\n" + "2017/07/06,148.8200,14934450.0000,149.0300,150.0400,148.0000\n" + "2017/07/05,150.3400,14321330.0000,149.0000,150.8500,148.1300\n" + "2017/07/03,148.4300,13862740.0000,151.7200,152.1500,147.8000\n" + "2017/06/30,150.9800,14909670.0000,151.9000,151.9200,150.0600\n" + "2017/06/29,151.0400,23948630.0000,152.2800,152.5000,148.9175\n" + "2017/06/28,153.2400,16696230.0000,150.9200,153.4700,149.8600\n" + "2017/06/27,150.5800,19351560.0000,152.8400,153.3100,150.3900\n" + "2017/06/26,153.5900,18030200.0000,156.2500,156.5000,153.1954\n" + "2017/06/23,155.0700,17897280.0000,152.7200,155.2000,152.6500\n" + "2017/06/22,153.4000,12835380.0000,153.0100,154.5500,152.9100\n" + "2017/06/21,153.9100,14943770.0000,152.3600,154.0800,151.8800\n" + "2017/06/20,152.2500,14733590.0000,152.8800,153.8400,152.2100\n" + "2017/06/19,152.8700,18944190.0000,151.7100,153.5700,151.7100\n" + "2017/06/16,150.6400,22843010.0000,149.5900,150.8300,148.6000\n" + "2017/06/15,149.8000,18956910.0000,147.6700,150.0366,146.3747\n" + "2017/06/14,150.2500,20774910.0000,151.2600,152.4000,149.0500\n" + "2017/06/13,150.6800,20474720.0000,150.1500,151.1800,148.9000\n" + "2017/06/12,148.4400,33150610.0000,148.1700,149.1950,144.5600\n" + "2017/06/09,149.6000,35541670.0000,154.7700,155.5900,146.6100\n" + "2017/06/08,154.7100,17795860.0000,154.0800,154.7300,153.1000\n" + "2017/06/07,153.1200,12040430.0000,153.2700,153.7500,152.3400\n" + "2017/06/06,152.8100,13443610.0000,153.4100,154.5200,152.4800\n" + "2017/06/05,153.6300,12504820.0000,153.6400,154.7088,153.4100\n" + "2017/06/02,153.6100,16838650.0000,151.8500,153.6300,151.3000\n" + "2017/06/01,151.5300,14511530.0000,151.7500,152.2900,150.3000\n" + "2017/05/31,151.4600,18001140.0000,152.7000,153.3500,151.0900\n" + "2017/05/30,152.3800,13213700.0000,151.9700,152.9000,151.6400\n" + "2017/05/26,152.1300,14984540.0000,152.2300,152.2500,151.1500\n" + "2017/05/25,151.9600,19827210.0000,150.3000,152.5900,149.9500\n" + "2017/05/24,150.0400,17914740.0000,148.5100,150.2300,148.4200\n" + "2017/05/23,148.0700,12807840.0000,148.5200,148.8100,147.2500\n" + "2017/05/22,148.2400,12578390.0000,148.0800,148.5900,147.6900\n" + "2017/05/19,148.0600,16165160.0000,148.4450,149.3900,147.9600\n" + "2017/05/18,147.6600,22778870.0000,144.7200,148.1500,144.5100\n" + "2017/05/17,144.8500,28232610.0000,148.0000,148.6700,144.4216\n" + "2017/05/16,149.7800,14506870.0000,150.1100,150.2100,149.0300\n" + "2017/05/15,150.1900,14952950.0000,150.1700,151.4800,149.7700\n" + "2017/05/12,150.3300,9584769.0000,150.4000,150.4600,149.6300\n" + "2017/05/11,150.0400,11832750.0000,150.3100,150.6500,149.4100\n" + "2017/05/10,150.2900,11994140.0000,150.2300,150.5200,148.8600\n" + "2017/05/09,150.4800,17381800.0000,151.4900,152.5900,150.2100\n" + "2017/05/08,151.0600,15813350.0000,150.7100,151.0800,149.7400\n" + "2017/05/05,150.2400,17104730.0000,151.4500,151.6300,149.7900\n" + "2017/05/04,150.8500,36185180.0000,150.1700,151.5200,148.7200\n" + "2017/05/03,151.8000,28301550.0000,153.6000,153.6000,151.3400\n" + "2017/05/02,152.7800,21617190.0000,153.3400,153.4400,151.6600\n" + "2017/05/01,152.4600,25170200.0000,151.7400,152.5700,151.4200\n" + "2017/04/28,150.2500,30607510.0000,149.5000,151.5300,149.0700\n" + "2017/04/27,147.7000,11072600.0000,146.6700,147.7500,146.1400\n" + "2017/04/26,146.5600,12388100.0000,147.0900,147.5900,146.0900\n" + "2017/04/25,146.4900,17718030.0000,145.7900,147.1500,145.7898\n" + "2017/04/24,145.4700,14397480.0000,144.9600,145.6738,144.3400\n" + "2017/04/21,143.6800,12172640.0000,143.9000,144.1700,142.2700\n" + "2017/04/20,143.8000,15948700.0000,142.9500,144.2500,142.6890\n" + "2017/04/19,142.2700,15544500.0000,141.3500,143.0400,141.2700\n" + "2017/04/18,140.9600,14795020.0000,141.2700,141.9050,140.6100\n" + "2017/04/17,141.4200,11488510.0000,139.7600,141.5500,139.7500\n" + "2017/04/13,139.3900,10939950.0000,139.6200,140.5800,139.3300\n" + "2017/04/12,139.5800,11600930.0000,139.7200,140.4000,139.4400\n" + "2017/04/11,139.9200,16627940.0000,140.8000,141.0299,138.8100\n" + "2017/04/10,141.0400,9033921.0000,141.0000,141.4300,140.6300\n" + "2017/04/07,140.7800,11811450.0000,141.2000,141.5500,140.2400\n" + "2017/04/06,141.1700,15089610.0000,142.1100,142.2200,140.9100\n" + "2017/04/05,141.8500,17132150.0000,142.2600,143.4400,141.2900\n" + "2017/04/04,141.7300,11934110.0000,141.8600,142.0900,141.2700\n" + "2017/04/03,142.2800,13552550.0000,141.9300,142.4700,140.8200\n" + "2017/03/31,142.0500,11366390.0000,142.3100,142.6300,141.8900\n" + "2017/03/30,142.4100,12393610.0000,142.4000,142.9500,141.8500\n" + "2017/03/29,142.6500,16504590.0000,141.9900,142.8600,141.4300\n" + "2017/03/28,141.7600,14660670.0000,140.3600,141.9500,140.0100\n" + "2017/03/27,140.3200,12791820.0000,139.0500,140.6500,138.7700\n" + "2017/03/24,140.3400,16636900.0000,140.0800,141.0244,139.7600\n" + "2017/03/23,139.5300,12992700.0000,139.4800,140.3900,139.0900\n" + "2017/03/22,139.5900,17020610.0000,137.9300,139.7900,137.6000\n" + "2017/03/21,138.5100,29855980.0000,141.1500,142.3082,138.4000\n" + "2017/03/20,139.9400,12002150.0000,139.7100,140.1900,139.2500\n" + "2017/03/17,139.8400,20487730.0000,140.3400,140.3400,139.7000\n" + "2017/03/16,139.9900,13604260.0000,140.2000,140.2500,139.7300\n" + "2017/03/15,139.7200,19315340.0000,139.2900,140.1000,138.4900\n" + "2017/03/14,139.3200,12935370.0000,139.4600,139.4600,138.5200\n" + "2017/03/13,139.6000,10949000.0000,138.7100,139.6800,138.6729\n" + "2017/03/10,138.7900,16299220.0000,138.9100,139.4900,138.2200\n" + "2017/03/09,138.2400,15523900.0000,137.7200,138.5700,137.4000\n" + "2017/03/08,137.7200,10174840.0000,137.1500,137.9900,137.0516\n" + "2017/03/07,137.3000,13517880.0000,137.0300,138.3700,136.9900\n" + "2017/03/06,137.4200,12562040.0000,136.8800,137.8300,136.5100\n" + "2017/03/03,137.1700,11154380.0000,136.6300,137.3300,136.0800\n" + "2017/03/02,136.7600,12278560.0000,137.0900,137.8200,136.3100\n" + "2017/03/01,137.4200,16241330.0000,136.4700,137.4800,136.3000\n" + "2017/02/28,135.5400,16096310.0000,136.7900,136.8050,134.7500\n" + "2017/02/27,136.4100,14300970.0000,135.2600,137.1846,135.0200\n" + "2017/02/24,135.4400,12617180.0000,134.1600,135.6200,134.1600\n" + "2017/02/23,135.3600,18408460.0000,135.8900,136.1200,134.3300\n" + "2017/02/22,136.1200,27331930.0000,133.6000,136.7900,133.4600\n" + "2017/02/21,133.7200,14735860.0000,133.5000,133.9100,132.9000\n" + "2017/02/17,133.5300,12265480.0000,133.5000,134.0912,133.1700\n" + "2017/02/16,133.8400,12816260.0000,133.0700,133.8700,133.0220\n" + "2017/02/15,133.4400,13215470.0000,133.4500,133.7000,132.6600\n" + "2017/02/14,133.8500,14346090.0000,134.1000,134.2300,132.5500\n" + "2017/02/13,134.0500,13511640.0000,134.6975,134.6975,133.7000\n" + "2017/02/10,134.1900,15050270.0000,134.1000,134.9400,133.6800\n" + "2017/02/09,134.1400,16454060.0000,134.4900,134.5000,133.3100\n" + "2017/02/08,134.2000,22370760.0000,132.6000,134.4400,132.4400\n" + "2017/02/07,131.8400,14585030.0000,132.2400,133.0000,131.6610\n" + "2017/02/06,132.0600,17015610.0000,130.9800,132.0600,130.3000\n" + "2017/02/03,130.9800,24776070.0000,131.2400,132.8500,130.7600\n" + "2017/02/02,130.8400,54281800.0000,133.2200,135.4900,130.4000\n" + "2017/02/01,133.2300,47329480.0000,132.2500,133.4900,130.6800\n" + "2017/01/31,130.3200,19642550.0000,130.1700,130.6600,129.5157\n" + "2017/01/30,130.9800,18919750.0000,131.5800,131.5800,129.6000\n" + "2017/01/27,132.1800,19505970.0000,132.6800,132.9500,131.0800\n" + "2017/01/26,132.7800,19964800.0000,131.6300,133.1400,131.4401\n" + "2017/01/25,131.4800,18745640.0000,130.0000,131.7400,129.7700\n" + "2017/01/24,129.3700,15140910.0000,129.3800,129.9000,128.3800\n" + "2017/01/23,128.9300,16566300.0000,127.3100,129.2500,126.9500\n" + "2017/01/20,127.0400,19068380.0000,128.1000,128.4800,126.7800\n" + "2017/01/19,127.5500,12171270.0000,128.2300,128.3500,127.4500\n" + "2017/01/18,127.9200,13107440.0000,128.4100,128.4300,126.8400\n" + "2017/01/17,127.8700,15279990.0000,128.0400,128.3400,127.4000\n" + "2017/01/13,128.3400,24857410.0000,127.4900,129.2700,127.3700\n" + "2017/01/12,126.6200,18596580.0000,125.6100,126.7300,124.8000\n" + "2017/01/11,126.0900,18334560.0000,124.3500,126.1200,124.0600\n" + "2017/01/10,124.3500,17299590.0000,124.8200,125.5000,124.2800\n" + "2017/01/09,124.9000,22874170.0000,123.5500,125.4300,123.0400\n" + "2017/01/06,123.4100,28525570.0000,120.9800,123.8800,120.0300\n" + "2017/01/05,120.6700,19459380.0000,118.8600,120.9500,118.3209\n" + "2017/01/04,118.6900,19594560.0000,117.5500,119.6600,117.2900\n" + "2017/01/03,116.8600,20635600.0000,116.0300,117.8400,115.5100\n";
String[] dataLine = rawData.split("\n");
List<Bar> bars = new ArrayList<>();
for (int i = dataLine.length - 1; i >= 0; i--) {
String[] barData = dataLine[i].split(",");
Bar bar = new BaseBar(ZonedDateTime.now().plusDays(i), barData[3], barData[4], barData[5], barData[1], barData[2]);
bars.add(bar);
}
data = new BaseTimeSeries("FB_daily", bars);
}
use of org.ta4j.core.BaseBar in project ta4j by ta4j.
the class PivotPointIndicatorTest method initDataForDailyTimeFrame.
@Before
public void initDataForDailyTimeFrame() {
String rawData_5_minutes = "2017-09-27,22:00:00,167.86,167.949,167.63,167.68,1746768,0\n" + "2017-09-28,15:35:00,167.94,168.37,167.6,168.24,706119,0\n" + "2017-09-28,15:40:00,168.27,168.399,167.16,167.34,501414,0\n" + "2017-09-28,15:45:00,167.39,168.31,167.39,168.29,332450,0\n" + "2017-09-28,15:50:00,168.2601,168.31,167.76,167.84,253173,0\n" + "2017-09-28,15:55:00,167.83,168.02,167.76,167.9,169481,0\n" + "2017-09-28,16:00:00,167.89,168.25,167.64,168.11,299024,0\n" + "2017-09-28,16:05:00,168.09,168.59,168.09,168.49,260943,0\n" + "2017-09-28,16:10:00,168.46,168.77,168.33,168.675,225866,0\n" + "2017-09-28,16:15:00,168.66,168.66,168.38,168.43,196108,0\n" + "2017-09-28,16:20:00,168.403,168.47,168.09,168.16,152852,0\n" + "2017-09-28,16:25:00,168.16,168.28,168.06,168.1,102641,0\n" + "2017-09-28,16:30:00,168.08,168.72,168.0621,168.6943,224124,0\n" + "2017-09-28,16:35:00,168.66,168.74,168.521,168.5726,159756,0\n" + "2017-09-28,16:40:00,168.56,168.7,168.4502,168.62,120405,0\n" + "2017-09-28,16:45:00,168.6,169.06,168.59,169.02,260050,0\n" + "2017-09-28,16:50:00,169.01,169.0696,168.69,168.8513,189081,0\n" + "2017-09-28,16:55:00,168.82,168.93,168.71,168.9,127425,0\n" + "2017-09-28,17:00:00,168.88,168.9116,168.6,168.6196,127020,0\n" + "2017-09-28,17:05:00,168.6173,168.69,168.48,168.6336,145866,0\n" + "2017-09-28,17:10:00,168.62,168.8,168.59,168.74,132152,0\n" + "2017-09-28,17:15:00,168.76,168.87,168.56,168.57,91621,0\n" + "2017-09-28,17:20:00,168.56,168.71,168.48,168.6901,101503,0\n" + "2017-09-28,17:25:00,168.69,168.74,168.57,168.6212,62758,0\n" + "2017-09-28,17:30:00,168.63,168.7,168.42,168.7,108778,0\n" + "2017-09-28,17:35:00,168.68,168.72,168.46,168.63,106170,0\n" + "2017-09-28,17:40:00,168.62,168.79,168.56,168.64,50262,0\n" + "2017-09-28,17:45:00,168.631,168.71,168.42,168.45,79449,0\n" + "2017-09-28,17:50:00,168.448,168.5,168.27,168.38,196568,0\n" + "2017-09-28,17:55:00,168.36,168.39,168.16,168.212,83478,0\n" + "2017-09-28,18:00:00,168.21,168.25,167.99,168.16,170722,0\n" + "2017-09-28,18:05:00,168.17,168.29,168.01,168.2149,109073,0\n" + "2017-09-28,18:10:00,168.23,168.31,168.1451,168.1668,65361,0\n" + "2017-09-28,18:15:00,168.2,168.27,168.03,168.07,56249,0\n" + "2017-09-28,18:20:00,168.075,168.27,168.075,168.25,95105,0\n" + "2017-09-28,18:25:00,168.2553,168.28,168.17,168.23,41837,0\n" + "2017-09-28,18:30:00,168.23,168.2532,168.02,168.1,54516,0\n" + "2017-09-28,18:35:00,168.11,168.19,168.1,168.17,77834,0\n" + "2017-09-28,18:40:00,168.17,168.1931,168.06,168.06,122010,0\n" + "2017-09-28,18:45:00,168.08,168.08,167.79,167.84,170118,0\n" + "2017-09-28,18:50:00,167.85,168,167.85,167.9814,61922,0\n" + "2017-09-28,18:55:00,168,168.09,167.88,168.09,57266,0\n" + "2017-09-28,19:00:00,168.09,168.19,168.09,168.1,58543,0\n" + "2017-09-28,19:05:00,168.1167,168.19,167.26,167.77,294259,0\n" + "2017-09-28,19:10:00,167.77,167.93,167.63,167.92,134389,0\n" + "2017-09-28,19:15:00,167.925,167.98,167.79,167.97,65208,0\n" + "2017-09-28,19:20:00,167.9602,168.12,167.92,168.008,97565,0\n" + "2017-09-28,19:25:00,168.01,168.29,167.99,168.22,99282,0\n" + "2017-09-28,19:30:00,168.2301,168.28,168.1403,168.24,68625,0\n" + "2017-09-28,19:35:00,168.25,168.28,168.15,168.27,41514,0\n" + "2017-09-28,19:40:00,168.28,168.4526,168.28,168.41,68396,0\n" + "2017-09-28,19:45:00,168.4126,168.49,168.37,168.42,49819,0\n" + "2017-09-28,19:50:00,168.42,168.46,168.3467,168.44,55438,0\n" + "2017-09-28,19:55:00,168.4358,168.55,168.43,168.54,76526,0\n" + "2017-09-28,20:00:00,168.56,168.69,168.53,168.58,87910,0\n" + "2017-09-28,20:05:00,168.58,168.665,168.53,168.6,70156,0\n" + "2017-09-28,20:10:00,168.6,168.6,168.44,168.52,61114,0\n" + "2017-09-28,20:15:00,168.51,168.51,168.365,168.43,58286,0\n" + "2017-09-28,20:20:00,168.3968,168.505,168.34,168.34,53982,0\n" + "2017-09-28,20:25:00,168.35,168.359,168.13,168.13,93947,0\n" + "2017-09-28,20:30:00,168.14,168.3,168.12,168.279,65449,0\n" + "2017-09-28,20:35:00,168.27,168.38,168.185,168.335,49059,0\n" + "2017-09-28,20:40:00,168.33,168.355,168.21,168.24,56022,0\n" + "2017-09-28,20:45:00,168.26,168.37,168.21,168.3632,36538,0\n" + "2017-09-28,20:50:00,168.37,168.42,168.2578,168.2699,58880,0\n" + "2017-09-28,20:55:00,168.29,168.38,168.26,168.37,39166,0\n" + "2017-09-28,21:00:00,168.37,168.55,168.37,168.44,71989,0\n" + "2017-09-28,21:05:00,168.45,168.56,168.39,168.4468,79944,0\n" + "2017-09-28,21:10:00,168.46,168.469,168.291,168.37,57256,0\n" + "2017-09-28,21:15:00,168.3497,168.49,168.33,168.4064,38794,0\n" + "2017-09-28,21:20:00,168.41,168.49,168.4,168.42,31063,0\n" + "2017-09-28,21:25:00,168.436,168.44,168.3,168.34,55086,0\n" + "2017-09-28,21:30:00,168.344,168.36,168.22,168.28,61384,0\n" + "2017-09-28,21:35:00,168.28,168.304,168.14,168.28,108728,0\n" + "2017-09-28,21:40:00,168.28,168.33,168.17,168.25,71156,0\n" + "2017-09-28,21:45:00,168.24,168.3336,168.2,168.29,112327,0\n" + "2017-09-28,21:50:00,168.3,168.33,168,168.2589,159273,0\n" + "2017-09-28,21:55:00,168.24,168.65,168.24,168.635,231928,0\n" + "2017-09-28,22:00:00,168.63,168.82,168.581,168.73,877554,0\n" + "2017-09-29,15:35:00,168.83,169.6,168.81,169.53,623389,0\n" + "2017-09-29,15:40:00,169.51,169.88,169.51,169.75,402657,0\n" + "2017-09-29,15:45:00,169.7999,169.7999,169.43,169.705,318978,0\n" + "2017-09-29,15:50:00,169.734,169.84,169.31,169.795,249071,0\n" + "2017-09-29,15:55:00,169.82,169.89,169.52,169.7,235315,0\n" + "2017-09-29,16:00:00,169.71,169.77,169.4099,169.5,281170,0\n" + "2017-09-29,16:05:00,169.56,169.83,169.38,169.8,326879,0\n" + "2017-09-29,16:10:00,169.79,170.24,169.65,170.2068,413516,0\n" + "2017-09-29,16:15:00,170.23,170.26,169.96,170.16,185665,0\n" + "2017-09-29,16:20:00,170.17,170.23,170.01,170.03,130839,0\n" + "2017-09-29,16:25:00,170.01,170.27,170.01,170.1625,122554,0\n" + "2017-09-29,16:30:00,170.1584,170.87,170.1584,170.58,401063,0\n" + "2017-09-29,16:35:00,170.58,170.83,170.52,170.6,180214,0\n" + "2017-09-29,16:40:00,170.59,170.843,170.56,170.843,136558,0\n" + "2017-09-29,16:45:00,170.85,170.88,170.621,170.71,143770,0\n" + "2017-09-29,16:50:00,170.73,170.74,170.5073,170.5284,117942,0\n" + "2017-09-29,16:55:00,170.53,170.55,170.46,170.481,125567,0\n" + "2017-09-29,17:00:00,170.48,170.74,170.47,170.68,161514,0\n" + "2017-09-29,17:05:00,170.6764,170.7303,170.56,170.56,101555,0\n" + "2017-09-29,17:10:00,170.5668,170.74,170.56,170.5738,88593,0\n" + "2017-09-29,17:15:00,170.57,170.65,170.44,170.448,103141,0\n" + "2017-09-29,17:20:00,170.445,170.86,170.41,170.7852,197559,0\n" + "2017-09-29,17:25:00,170.79,170.96,170.76,170.81,170037,0\n" + "2017-09-29,17:30:00,170.83,170.8404,170.67,170.72,156036,0\n" + "2017-09-29,17:35:00,170.71,170.87,170.67,170.81,108098,0\n" + "2017-09-29,17:40:00,170.81,170.8786,170.6048,170.6288,182604,0\n" + "2017-09-29,17:45:00,170.63,170.64,170.4363,170.4363,101391,0\n" + "2017-09-29,17:50:00,170.4393,170.4757,170.34,170.43,114050,0\n" + "2017-09-29,17:55:00,170.44,170.63,170.44,170.59,93861,0\n" + "2017-09-29,18:00:00,170.59,170.639,170.53,170.58,95934,0\n" + "2017-09-29,18:05:00,170.585,170.69,170.5,170.54,76956,0\n" + "2017-09-29,18:10:00,170.53,170.61,170.5,170.579,63106,0\n" + "2017-09-29,18:15:00,170.55,170.58,170.505,170.54,70915,0\n" + "2017-09-29,18:20:00,170.55,170.7,170.545,170.595,69296,0\n" + "2017-09-29,18:25:00,170.5972,170.66,170.55,170.61,51545,0\n" + "2017-09-29,18:30:00,170.6,170.82,170.58,170.795,80687,0\n" + "2017-09-29,18:35:00,170.7944,170.856,170.79,170.84,91664,0\n" + "2017-09-29,18:40:00,170.8398,170.85,170.74,170.77,76334,0\n" + "2017-09-29,18:45:00,170.7701,171.11,170.74,171.025,378515,0\n" + "2017-09-29,18:50:00,171.021,171.22,171.01,171.1808,222109,0\n" + "2017-09-29,18:55:00,171.195,171.38,171.14,171.37,156630,0\n" + "2017-09-29,19:00:00,171.35,171.39,171.2401,171.35,152538,0\n" + "2017-09-29,19:05:00,171.3468,171.59,171.3468,171.58,166360,0\n" + "2017-09-29,19:10:00,171.5784,171.65,171.5,171.58,116604,0\n" + "2017-09-29,19:15:00,171.58,171.66,171.45,171.55,123553,0\n" + "2017-09-29,19:20:00,171.54,171.55,171.39,171.41,109259,0\n" + "2017-09-29,19:25:00,171.4142,171.5,171.33,171.38,83691,0\n" + "2017-09-29,19:30:00,171.37,171.3901,171.22,171.25,95366,0\n" + "2017-09-29,19:35:00,171.24,171.28,171.22,171.231,100219,0\n" + "2017-09-29,19:40:00,171.23,171.4,171.2298,171.4,93148,0\n" + "2017-09-29,19:45:00,171.38,171.5,171.34,171.39,80264,0\n" + "2017-09-29,19:50:00,171.3942,171.41,171.21,171.22,52943,0\n" + "2017-09-29,19:55:00,171.2265,171.31,171.18,171.3022,75379,0\n" + "2017-09-29,20:00:00,171.31,171.31,171.11,171.2,65708,0\n" + "2017-09-29,20:05:00,171.2042,171.29,171.12,171.13,57920,0\n" + "2017-09-29,20:10:00,171.13,171.13,170.94,171.0021,112416,0\n" + "2017-09-29,20:15:00,171,171,170.88,170.9,46032,0\n" + "2017-09-29,20:20:00,170.8944,170.9604,170.86,170.89,72046,0\n" + "2017-09-29,20:25:00,170.88,170.9353,170.83,170.92,84673,0\n" + "2017-09-29,20:30:00,170.919,170.97,170.85,170.8601,55503,0\n" + "2017-09-29,20:35:00,170.85,170.89,170.7514,170.79,47372,0\n" + "2017-09-29,20:40:00,170.7858,170.7899,170.65,170.72,77312,0\n" + "2017-09-29,20:45:00,170.725,170.74,170.49,170.51,112914,0\n" + "2017-09-29,20:50:00,170.52,170.6,170.5,170.5384,94919,0\n" + "2017-09-29,20:55:00,170.5375,170.74,170.48,170.74,105034,0\n" + "2017-09-29,21:00:00,170.73,170.79,170.64,170.64,102575,0\n" + "2017-09-29,21:05:00,170.64,170.76,170.5901,170.75,64518,0\n" + "2017-09-29,21:10:00,170.74,170.75,170.6,170.6101,103496,0\n" + "2017-09-29,21:15:00,170.61,170.72,170.57,170.6101,167382,0\n" + "2017-09-29,21:20:00,170.6084,170.61,170.3,170.45,110465,0\n" + "2017-09-29,21:25:00,170.44,170.5836,170.4,170.57,146617,0\n" + "2017-09-29,21:30:00,170.58,170.72,170.56,170.56,94241,0\n" + "2017-09-29,21:35:00,170.56,170.56,170.38,170.3879,88600,0\n" + "2017-09-29,21:40:00,170.3807,170.48,170.37,170.42,119247,0\n" + "2017-09-29,21:45:00,170.4166,170.44,170.28,170.3332,140148,0\n" + "2017-09-29,21:50:00,170.32,170.57,170.31,170.41,210241,0\n" + "2017-09-29,21:55:00,170.42,170.97,170.42,170.88,470723,0\n" + "2017-09-29,22:00:00,170.89,170.96,170.75,170.81,529077,0\n" + "2017-10-02,15:35:00,171.39,171.74,171.07,171.55,588294,0\n" + "2017-10-02,15:40:00,171.56,171.87,171.2,171.44,359622,0\n" + "2017-10-02,15:45:00,171.43,171.43,171,171,389084,0\n" + "2017-10-02,15:50:00,171.02,171.0213,170.5,170.57,565126,0\n" + "2017-10-02,15:55:00,170.55,170.66,170.37,170.57,280042,0\n" + "2017-10-02,16:00:00,170.58,170.9,170.43,170.8,239524,0\n" + "2017-10-02,16:05:00,170.77,170.86,170.53,170.84,185532,0\n" + "2017-10-02,16:10:00,170.833,171.0629,170.51,170.6108,318287,0\n" + "2017-10-02,16:15:00,170.61,170.69,170.25,170.515,224911,0\n" + "2017-10-02,16:20:00,170.5146,170.89,170.5,170.63,127456,0\n" + "2017-10-02,16:25:00,170.64,170.77,170.47,170.74,119044,0\n" + "2017-10-02,16:30:00,170.76,170.88,170.67,170.71,88645,0\n" + "2017-10-02,16:35:00,170.7,171.05,170.6,171.05,129027,0\n" + "2017-10-02,16:40:00,171.03,171.03,170.7088,170.769,91230,0\n" + "2017-10-02,16:45:00,170.75,170.81,170.53,170.67,118312,0\n" + "2017-10-02,16:50:00,170.7,170.91,170.685,170.8892,67959,0\n" + "2017-10-02,16:55:00,170.92,170.92,170.62,170.78,57646,0\n" + "2017-10-02,17:00:00,170.8,170.88,170.685,170.73,45319,0\n" + "2017-10-02,17:05:00,170.73,170.79,170.5701,170.65,99757,0\n" + "2017-10-02,17:10:00,170.66,170.71,170.58,170.62,53827,0\n" + "2017-10-02,17:15:00,170.62,170.7305,170.54,170.6805,87297,0\n" + "2017-10-02,17:20:00,170.67,170.915,170.59,170.63,92718,0\n" + "2017-10-02,17:25:00,170.6184,170.69,170.57,170.65,56440,0\n" + "2017-10-02,17:30:00,170.6406,170.66,170.4684,170.55,126303,0\n" + "2017-10-02,17:35:00,170.559,170.559,170.11,170.1489,174048,0\n" + "2017-10-02,17:40:00,170.1445,170.15,169.89,170.0316,281141,0\n" + "2017-10-02,17:45:00,170.03,170.07,169.63,169.71,205253,0\n" + "2017-10-02,17:50:00,169.72,169.75,169.44,169.6407,163311,0\n" + "2017-10-02,17:55:00,169.645,169.834,169.47,169.83,170545,0\n" + "2017-10-02,18:00:00,169.85,169.88,169.1,169.1827,206384,0\n" + "2017-10-02,18:05:00,169.18,169.1827,168.75,169.08,274548,0\n" + "2017-10-02,18:10:00,169.08,169.3,169.02,169.24,142191,0\n" + "2017-10-02,18:15:00,169.2646,169.28,169.05,169.13,159430,0\n" + "2017-10-02,18:20:00,169.1184,169.39,169.06,169.39,112785,0\n" + "2017-10-02,18:25:00,169.3761,169.668,169.3584,169.57,139816,0\n" + "2017-10-02,18:30:00,169.58,169.7,169.53,169.57,75071,0\n" + "2017-10-02,18:35:00,169.56,169.66,169.4226,169.51,87149,0\n" + "2017-10-02,18:40:00,169.51,169.5689,169.44,169.44,81034,0\n" + "2017-10-02,18:45:00,169.4425,169.495,169.33,169.495,102046,0\n" + "2017-10-02,18:50:00,169.49,169.56,169.42,169.42,93721,0\n" + "2017-10-02,18:55:00,169.42,169.5,169.39,169.4276,62662,0\n" + "2017-10-02,19:00:00,169.4163,169.63,169.4163,169.59,62796,0\n" + "2017-10-02,19:05:00,169.59,169.77,169.47,169.7149,99259,0\n" + "2017-10-02,19:10:00,169.71,169.77,169.5946,169.6,58483,0\n" + "2017-10-02,19:15:00,169.61,169.75,169.5,169.72,56775,0\n" + "2017-10-02,19:20:00,169.73,169.85,169.6621,169.79,59568,0\n" + "2017-10-02,19:25:00,169.8,169.8856,169.71,169.8109,59454,0\n" + "2017-10-02,19:30:00,169.81,169.8294,169.7,169.78,60161,0\n" + "2017-10-02,19:35:00,169.78,169.83,169.6314,169.72,51695,0\n" + "2017-10-02,19:40:00,169.72,169.8,169.49,169.6394,92280,0\n" + "2017-10-02,19:45:00,169.65,169.65,169.47,169.5,84189,0\n" + "2017-10-02,19:50:00,169.511,169.6999,169.511,169.6404,52544,0\n" + "2017-10-02,19:55:00,169.65,169.68,169.62,169.67,45082,0\n" + "2017-10-02,20:00:00,169.6684,169.7,169.52,169.65,58666,0\n" + "2017-10-02,20:05:00,169.65,169.73,169.57,169.66,62389,0\n" + "2017-10-02,20:10:00,169.66,169.72,169.6,169.72,47445,0\n" + "2017-10-02,20:15:00,169.73,169.73,169.6,169.64,64938,0\n" + "2017-10-02,20:20:00,169.6453,169.65,169.53,169.62,58709,0\n" + "2017-10-02,20:25:00,169.61,169.71,169.55,169.65,62378,0\n" + "2017-10-02,20:30:00,169.6514,170.14,169.64,170.115,232773,0\n" + "2017-10-02,20:35:00,170.11,170.33,170.1,170.302,139619,0\n" + "2017-10-02,20:40:00,170.3,170.312,170.16,170.285,86557,0\n" + "2017-10-02,20:45:00,170.285,170.32,170.1,170.14,76256,0\n" + "2017-10-02,20:50:00,170.13,170.18,169.88,169.94,144037,0\n" + "2017-10-02,20:55:00,169.9406,170.02,169.88,169.9031,73110,0\n" + "2017-10-02,21:00:00,169.91,169.98,169.77,169.83,96418,0\n" + "2017-10-02,21:05:00,169.82,169.98,169.7,169.8002,130333,0\n" + "2017-10-02,21:10:00,169.8,169.82,169.65,169.7387,86945,0\n" + "2017-10-02,21:15:00,169.72,169.78,169.62,169.63,91854,0\n" + "2017-10-02,21:20:00,169.63,169.7,169.56,169.68,87127,0\n" + "2017-10-02,21:25:00,169.67,169.84,169.635,169.65,87038,0\n" + "2017-10-02,21:30:00,169.65,169.7553,169.65,169.65,74510,0\n" + "2017-10-02,21:35:00,169.64,169.745,169.5276,169.55,102864,0\n" + "2017-10-02,21:40:00,169.54,169.65,169.53,169.62,112944,0\n" + "2017-10-02,21:45:00,169.6102,169.63,169.38,169.4851,135767,0\n" + "2017-10-02,21:50:00,169.49,169.57,169.36,169.54,120950,0\n" + "2017-10-02,21:55:00,169.54,169.82,169.25,169.62,354984,0\n" + "2017-10-02,22:00:00,169.6207,169.67,169.35,169.47,1015547,0\n" + "2017-10-03,15:35:00,169.3,169.74,169.2,169.6352,406843,0\n" + "2017-10-03,15:40:00,169.62,170.44,169.51,170.3745,378048,0\n" + "2017-10-03,15:45:00,170.3805,170.47,170.01,170.02,254547,0\n" + "2017-10-03,15:50:00,170.058,170.72,170.02,170.64,250809,0\n" + "2017-10-03,15:55:00,170.65,170.66,170.332,170.44,158609,0\n" + "2017-10-03,16:00:00,170.43,170.73,170.425,170.59,136805,0\n" + "2017-10-03,16:05:00,170.59,170.7,170.33,170.555,97150,0\n" + "2017-10-03,16:10:00,170.56,170.585,170.1,170.285,139735,0\n" + "2017-10-03,16:15:00,170.29,170.35,169.65,169.67,216528,0\n" + "2017-10-03,16:20:00,169.69,169.95,169.44,169.9117,283003,0\n" + "2017-10-03,16:25:00,169.911,170.09,169.72,170,120083,0\n" + "2017-10-03,16:30:00,169.99,170.14,169.92,170.053,110589,0\n" + "2017-10-03,16:35:00,170.05,170.32,169.85,170.2,181088,0\n" + "2017-10-03,16:40:00,170.19,170.47,170.1445,170.47,118138,0\n" + "2017-10-03,16:45:00,170.47,170.49,170.18,170.183,55228,0\n" + "2017-10-03,16:50:00,170.18,170.34,170.11,170.24,64900,0\n" + "2017-10-03,16:55:00,170.25,170.39,170.11,170.21,72447,0\n" + "2017-10-03,17:00:00,170.2078,170.46,170.1684,170.3365,87446,0\n" + "2017-10-03,17:05:00,170.32,170.46,170.31,170.35,54672,0\n" + "2017-10-03,17:10:00,170.35,170.47,170.33,170.37,79862,0\n" + "2017-10-03,17:15:00,170.38,170.43,170.27,170.36,70582,0\n" + "2017-10-03,17:20:00,170.3601,170.47,170.342,170.47,48196,0\n" + "2017-10-03,17:25:00,170.47,170.578,170.4,170.47,54960,0\n" + "2017-10-03,17:30:00,170.47,170.48,170.1999,170.219,59327,0\n" + "2017-10-03,17:35:00,170.22,170.3624,170.18,170.29,52495,0\n" + "2017-10-03,17:40:00,170.28,170.289,170.1,170.175,58176,0\n" + "2017-10-03,17:45:00,170.16,170.22,170.0701,170.18,41250,0\n" + "2017-10-03,17:50:00,170.17,170.26,170.09,170.26,37439,0\n" + "2017-10-03,17:55:00,170.25,170.25,170.09,170.16,36528,0\n" + "2017-10-03,18:00:00,170.1559,170.1559,169.97,170.0568,57627,0\n" + "2017-10-03,18:05:00,170.06,170.14,170.02,170.06,33036,0\n" + "2017-10-03,18:10:00,170.051,170.09,169.95,170.08,42033,0\n" + "2017-10-03,18:15:00,170.09,170.2497,170.06,170.18,44289,0\n" + "2017-10-03,18:20:00,170.18,170.265,170.1,170.12,42199,0\n" + "2017-10-03,18:25:00,170.11,170.13,170,170.09,127542,0\n" + "2017-10-03,18:30:00,170.09,170.14,170.02,170.03,45278,0\n" + "2017-10-03,18:35:00,170.03,170.11,170,170.1016,77518,0\n" + "2017-10-03,18:40:00,170.1,170.13,170,170.0268,43636,0\n" + "2017-10-03,18:45:00,170.03,170.04,169.9,169.93,75863,0\n" + "2017-10-03,18:50:00,169.93,170.03,169.82,169.85,71378,0\n" + "2017-10-03,18:55:00,169.85,170,169.84,169.9252,51154,0\n" + "2017-10-03,19:00:00,169.93,169.98,169.9,169.98,21103,0\n" + "2017-10-03,19:05:00,169.9769,170.09,169.91,170.09,56346,0\n" + "2017-10-03,19:10:00,170.09,170.1,169.93,169.935,48134,0\n" + "2017-10-03,19:15:00,169.94,170.05,169.94,170.0301,24779,0\n" + "2017-10-03,19:20:00,170.0335,170.0335,169.8945,169.934,28837,0\n" + "2017-10-03,19:25:00,169.92,170.03,169.88,169.9234,55398,0\n" + "2017-10-03,19:30:00,169.91,170.02,169.9,169.94,56641,0\n" + "2017-10-03,19:35:00,169.9366,169.97,169.86,169.88,46685,0\n" + "2017-10-03,19:40:00,169.86,170.0251,169.85,170,44470,0\n" + "2017-10-03,19:45:00,170,170.01,169.83,169.91,70571,0\n" + "2017-10-03,19:50:00,169.91,169.9872,169.91,169.97,24873,0\n" + "2017-10-03,19:55:00,169.98,170.03,169.97,170.0165,22077,0\n" + "2017-10-03,20:00:00,170.0209,170.03,169.93,169.989,38646,0\n" + "2017-10-03,20:05:00,169.97,170.1,169.96,170.0701,41230,0\n" + "2017-10-03,20:10:00,170.08,170.09,170.01,170.0343,43049,0\n" + "2017-10-03,20:15:00,170.04,170.17,170.04,170.155,40711,0\n" + "2017-10-03,20:20:00,170.15,170.255,170.13,170.19,53786,0\n" + "2017-10-03,20:25:00,170.18,170.25,170.15,170.17,37430,0\n" + "2017-10-03,20:30:00,170.16,170.16,170.0699,170.11,25705,0\n" + "2017-10-03,20:35:00,170.11,170.14,170.06,170.09,38273,0\n" + "2017-10-03,20:40:00,170.1,170.1197,170,170.05,35705,0\n" + "2017-10-03,20:45:00,170.0451,170.09,170.02,170.04,22701,0\n" + "2017-10-03,20:50:00,170.03,170.11,169.97,170.05,48164,0\n" + "2017-10-03,20:55:00,170.055,170.1389,170.04,170.06,39045,0\n" + "2017-10-03,21:00:00,170.07,170.14,170.0445,170.08,26367,0\n" + "2017-10-03,21:05:00,170.087,170.1,169.95,169.98,37274,0\n" + "2017-10-03,21:10:00,169.97,169.98,169.87,169.9155,60362,0\n" + "2017-10-03,21:15:00,169.9199,170.01,169.85,170,80632,0\n" + "2017-10-03,21:20:00,170,170.02,169.9167,169.99,67873,0\n" + "2017-10-03,21:25:00,169.99,170.1,169.96,169.96,35384,0\n" + "2017-10-03,21:30:00,169.96,170.04,169.86,169.98,50925,0\n" + "2017-10-03,21:35:00,169.985,170.04,169.93,169.97,67340,0\n" + "2017-10-03,21:40:00,169.98,170.16,169.92,170.16,121267,0\n" + "2017-10-03,21:45:00,170.17,170.17,169.99,170.04,73965,0\n" + "2017-10-03,21:50:00,170.0498,170.05,169.87,169.8933,92198,0\n" + "2017-10-03,21:55:00,169.9,169.95,169.82,169.91,149032,0\n" + "2017-10-03,22:00:00,169.9154,170,169.76,169.96,743526,0\n" + "2017-10-04,15:35:00,169.83,170.24,169.52,169.975,398157,0\n" + "2017-10-04,15:40:00,169.99,170.1218,169.53,169.671,299473,0\n" + "2017-10-04,15:45:00,169.685,169.92,169.12,169.34,280530,0\n" + "2017-10-04,15:50:00,169.35,169.58,169.19,169.53,173560,0\n" + "2017-10-04,15:55:00,169.5599,169.85,169.52,169.75,152409,0\n" + "2017-10-04,16:00:00,169.74,169.9,169.68,169.786,97553,0\n" + "2017-10-04,16:05:00,169.785,169.98,169.6001,169.9364,132937,0\n" + "2017-10-04,16:10:00,169.935,170.1,169.83,170.0978,184817,0\n" + "2017-10-04,16:15:00,170.09,170.52,170.07,170.46,311474,0\n" + "2017-10-04,16:20:00,170.46,170.65,170.46,170.5552,142525,0\n" + "2017-10-04,16:25:00,170.5557,170.6,170.43,170.56,105005,0\n" + "2017-10-04,16:30:00,170.57,170.6499,170.28,170.29,83623,0\n" + "2017-10-04,16:35:00,170.29,170.41,170.03,170.16,107134,0\n" + "2017-10-04,16:40:00,170.15,170.17,170.02,170.07,71016,0\n" + "2017-10-04,16:45:00,170.05,170.1599,169.9,170.14,98949,0\n" + "2017-10-04,16:50:00,170.1293,170.25,170.05,170.1565,57149,0\n" + "2017-10-04,16:55:00,170.19,170.28,170.14,170.2767,41865,0\n" + "2017-10-04,17:00:00,170.275,170.45,170.27,170.359,89708,0\n" + "2017-10-04,17:05:00,170.36,170.5,170.36,170.425,90904,0\n" + "2017-10-04,17:10:00,170.4158,170.53,170.28,170.32,85245,0\n" + "2017-10-04,17:15:00,170.32,170.36,170.19,170.19,35387,0\n" + "2017-10-04,17:20:00,170.2068,170.28,170.1601,170.23,49177,0\n" + "2017-10-04,17:25:00,170.23,170.28,170.18,170.27,68875,0\n" + "2017-10-04,17:30:00,170.27,170.486,170.18,170.48,62464,0\n" + "2017-10-04,17:35:00,170.4799,170.53,170.29,170.3959,62946,0\n" + "2017-10-04,17:40:00,170.4,170.67,170.4,170.47,299961,0\n" + "2017-10-04,17:45:00,170.45,170.45,170.2401,170.285,52537,0\n" + "2017-10-04,17:50:00,170.29,170.32,170.22,170.28,33454,0\n" + "2017-10-04,17:55:00,170.27,170.37,170.11,170.1332,87204,0\n" + "2017-10-04,18:00:00,170.12,170.18,170.0277,170.09,82042,0\n" + "2017-10-04,18:05:00,170.0844,170.11,169.98,170.06,47941,0\n" + "2017-10-04,18:10:00,170.04,170.15,170.016,170.13,41231,0\n" + "2017-10-04,18:15:00,170.12,170.2,170.1,170.15,30757,0\n" + "2017-10-04,18:20:00,170.1709,170.54,170.15,170.37,107087,0\n" + "2017-10-04,18:25:00,170.38,170.46,170.27,170.42,53164,0\n" + "2017-10-04,18:30:00,170.43,170.4391,170.33,170.3617,16467,0\n" + "2017-10-04,18:35:00,170.38,170.38,170.2004,170.2095,48056,0\n" + "2017-10-04,18:40:00,170.22,170.31,170.14,170.175,42391,0\n" + "2017-10-04,18:45:00,170.169,170.2,170.08,170.199,30249,0\n" + "2017-10-04,18:50:00,170.17,170.17,169.99,170.0399,90641,0\n" + "2017-10-04,18:55:00,170.035,170.17,170.02,170.17,42272,0\n" + "2017-10-04,19:00:00,170.17,170.3011,169.9,169.95,190402,0\n" + "2017-10-04,19:05:00,169.95,170.0011,169.72,169.8,185279,0\n" + "2017-10-04,19:10:00,169.7912,169.82,169.7,169.7,87907,0\n" + "2017-10-04,19:15:00,169.7084,169.76,169.5,169.5497,150575,0\n" + "2017-10-04,19:20:00,169.55,169.55,169.3,169.48,165884,0\n" + "2017-10-04,19:25:00,169.4624,169.5492,169.41,169.5145,93177,0\n" + "2017-10-04,19:30:00,169.5147,169.59,169.45,169.48,68605,0\n" + "2017-10-04,19:35:00,169.4715,169.48,169.25,169.3342,163891,0\n" + "2017-10-04,19:40:00,169.335,169.335,168.89,169.0541,397847,0\n" + "2017-10-04,19:45:00,169.0541,169.1313,168.95,169.1313,118981,0\n" + "2017-10-04,19:50:00,169.1356,169.17,169.05,169.13,107858,0\n" + "2017-10-04,19:55:00,169.15,169.4,169.14,169.29,150707,0\n" + "2017-10-04,20:00:00,169.2944,169.37,169.19,169.31,74009,0\n" + "2017-10-04,20:05:00,169.31,169.42,169.27,169.3,149683,0\n" + "2017-10-04,20:10:00,169.29,169.49,169.29,169.35,65945,0\n" + "2017-10-04,20:15:00,169.34,169.36,169.23,169.2744,51156,0\n" + "2017-10-04,20:20:00,169.28,169.297,169.1732,169.285,33019,0\n" + "2017-10-04,20:25:00,169.28,169.3399,169.23,169.24,34718,0\n" + "2017-10-04,20:30:00,169.2344,169.27,169.14,169.2,175020,0\n" + "2017-10-04,20:35:00,169.2056,169.25,169.08,169.11,135676,0\n" + "2017-10-04,20:40:00,169.1,169.16,169.065,169.09,82331,0\n" + "2017-10-04,20:45:00,169.09,169.18,169.05,169.15,112675,0\n" + "2017-10-04,20:50:00,169.1401,169.16,169.13,169.15,39535,0\n" + "2017-10-04,20:55:00,169.15,169.255,169.14,169.21,88144,0\n" + "2017-10-04,21:00:00,169.22,169.28,169.2,169.22,55237,0\n" + "2017-10-04,21:05:00,169.219,169.24,169.0901,169.17,76080,0\n" + "2017-10-04,21:10:00,169.1819,169.24,169.13,169.23,55788,0\n" + "2017-10-04,21:15:00,169.24,169.34,169.2,169.305,83015,0\n" + "2017-10-04,21:20:00,169.305,169.43,169.29,169.37,114681,0\n" + "2017-10-04,21:25:00,169.39,169.4,169.32,169.34,69299,0\n" + "2017-10-04,21:30:00,169.33,169.35,169.21,169.21,88829,0\n" + "2017-10-04,21:35:00,169.21,169.25,169.12,169.23,132991,0\n" + "2017-10-04,21:40:00,169.22,169.2961,169.14,169.18,104071,0\n" + "2017-10-04,21:45:00,169.18,169.19,169.025,169.1,120937,0\n" + "2017-10-04,21:50:00,169.09,169.12,168.92,168.99,264181,0\n" + "2017-10-04,21:55:00,169,169,168.32,168.36,567124,0\n" + "2017-10-04,22:00:00,168.3593,168.48,168.29,168.42,1263104,0" + "2017-10-05,15:35:00,169.18,169.75,169.17,169.4,551260,0\n" + "2017-10-05,15:40:00,169.44,169.66,169.3001,169.33,300542,0\n" + "2017-10-05,15:45:00,169.33,169.615,169.05,169.43,446135,0\n" + "2017-10-05,15:50:00,169.43,169.66,169.43,169.48,175125,0\n" + "2017-10-05,15:55:00,169.5069,169.65,169.02,169.22,218871,0\n" + "2017-10-05,16:00:00,169.23,169.28,168.76,168.82,260499,0\n" + "2017-10-05,16:05:00,168.79,169.07,168.77,168.87,246255,0\n" + "2017-10-05,16:10:00,168.87,169.08,168.83,168.91,283385,0\n" + "2017-10-05,16:15:00,168.9,168.9899,168.83,168.9,149244,0\n" + "2017-10-05,16:20:00,168.9,169.37,168.87,169.338,250532,0\n" + "2017-10-05,16:25:00,169.31,169.5,169.2903,169.38,136187,0\n" + "2017-10-05,16:30:00,169.371,169.63,169.34,169.36,239973,0\n" + "2017-10-05,16:35:00,169.35,169.38,168.62,168.8495,271145,0\n" + "2017-10-05,16:40:00,168.86,169.157,168.86,169.12,116436,0\n" + "2017-10-05,16:45:00,169.12,169.25,168.97,169.075,116907,0\n" + "2017-10-05,16:50:00,169.0769,169.12,168.8,168.83,125154,0\n" + "2017-10-05,16:55:00,168.83,168.87,168.62,168.66,250228,0\n" + "2017-10-05,17:00:00,168.65,168.831,168.6,168.66,131683,0\n" + "2017-10-05,17:05:00,168.67,168.85,168.67,168.78,77072,0\n" + "2017-10-05,17:10:00,168.781,168.89,168.65,168.68,191292,0\n" + "2017-10-05,17:15:00,168.69,168.9,168.69,168.81,55178,0\n" + "2017-10-05,17:20:00,168.82,168.825,168.71,168.75,51215,0\n" + "2017-10-05,17:25:00,168.75,168.918,168.75,168.9,66924,0\n" + "2017-10-05,17:30:00,168.89,169.07,168.89,169.03,129045,0\n" + "2017-10-05,17:35:00,169.03,169.24,168.99,169.24,103682,0\n" + "2017-10-05,17:40:00,169.235,169.25,169,169.065,72765,0\n" + "2017-10-05,17:45:00,169.08,169.21,169.06,169.1,52377,0\n" + "2017-10-05,17:50:00,169.09,169.1,168.81,168.84,97458,0\n" + "2017-10-05,17:55:00,168.84,168.8709,168.7,168.79,96050,0\n" + "2017-10-05,18:00:00,168.79,168.97,168.75,168.935,57725,0\n" + "2017-10-05,18:05:00,168.92,169.09,168.9199,168.99,58552,0\n" + "2017-10-05,18:10:00,168.99,169.04,168.93,168.9438,33871,0\n" + "2017-10-05,18:15:00,168.95,169.25,168.94,169.21,92189,0\n" + "2017-10-05,18:20:00,169.21,169.54,169.21,169.52,164189,0\n" + "2017-10-05,18:25:00,169.53,169.99,169.53,169.97,319811,0\n" + "2017-10-05,18:30:00,169.955,170.34,169.93,170.2998,425631,0\n" + "2017-10-05,18:35:00,170.3,170.49,170.14,170.2,244958,0\n" + "2017-10-05,18:40:00,170.2,170.66,170.131,170.6,229089,0\n" + "2017-10-05,18:45:00,170.59,170.63,170.34,170.51,145818,0\n" + "2017-10-05,18:50:00,170.5127,170.75,170.5044,170.7,199695,0\n" + "2017-10-05,18:55:00,170.68,170.7,170.591,170.664,87695,0\n" + "2017-10-05,19:00:00,170.65,170.7,170.54,170.6,132210,0\n" + "2017-10-05,19:05:00,170.59,170.72,170.52,170.6907,84610,0\n" + "2017-10-05,19:10:00,170.6799,170.7,170.55,170.64,59561,0\n" + "2017-10-05,19:15:00,170.64,170.65,170.45,170.58,74779,0\n" + "2017-10-05,19:20:00,170.59,170.6,170.41,170.5264,73591,0\n" + "2017-10-05,19:25:00,170.53,170.62,170.44,170.52,48826,0\n" + "2017-10-05,19:30:00,170.52,170.63,170.44,170.6,85789,0\n" + "2017-10-05,19:35:00,170.5965,170.62,170.38,170.6,109223,0\n" + "2017-10-05,19:40:00,170.6,170.82,170.52,170.7848,139266,0\n" + "2017-10-05,19:45:00,170.7776,170.8,170.61,170.72,79229,0\n" + "2017-10-05,19:50:00,170.7037,170.79,170.6701,170.73,77545,0\n" + "2017-10-05,19:55:00,170.74,170.88,170.74,170.8,122197,0\n" + "2017-10-05,20:00:00,170.805,170.89,170.57,170.64,163130,0\n" + "2017-10-05,20:05:00,170.63,170.69,170.53,170.54,83694,0\n" + "2017-10-05,20:10:00,170.54,170.63,170.53,170.5502,49975,0\n" + "2017-10-05,20:15:00,170.55,170.59,170.5,170.5667,35498,0\n" + "2017-10-05,20:20:00,170.575,170.66,170.56,170.6,73553,0\n" + "2017-10-05,20:25:00,170.59,170.63,170.52,170.55,53525,0\n" + "2017-10-05,20:30:00,170.555,170.59,170.45,170.4936,39509,0\n" + "2017-10-05,20:35:00,170.5032,170.615,170.49,170.5708,69477,0\n" + "2017-10-05,20:40:00,170.5751,170.62,170.51,170.57,67598,0\n" + "2017-10-05,20:45:00,170.5825,170.69,170.55,170.59,106098,0\n" + "2017-10-05,20:50:00,170.6,170.64,170.52,170.56,47525,0\n" + "2017-10-05,20:55:00,170.5615,170.62,170.53,170.58,45716,0\n" + "2017-10-05,21:00:00,170.599,170.9,170.52,170.76,97779,0\n" + "2017-10-05,21:05:00,170.76,171,170.75,170.976,224416,0\n" + "2017-10-05,21:10:00,170.98,171,170.77,170.84,135360,0\n" + "2017-10-05,21:15:00,170.83,170.86,170.75,170.77,70224,0\n" + "2017-10-05,21:20:00,170.783,170.89,170.75,170.885,69051,0\n" + "2017-10-05,21:25:00,170.8899,171,170.84,170.89,110395,0\n" + "2017-10-05,21:30:00,170.9,170.99,170.83,170.83,149043,0\n" + "2017-10-05,21:35:00,170.83,171,170.81,170.96,119791,0\n" + "2017-10-05,21:40:00,170.97,171.05,170.81,170.985,251145,0\n" + "2017-10-05,21:45:00,170.99,171.1,170.9795,171.08,143574,0\n" + "2017-10-05,21:50:00,171.09,171.17,170.98,171.05,195975,0\n" + "2017-10-05,21:55:00,171.04,171.15,170.8,171.131,433457,0\n" + "2017-10-05,22:00:00,171.14,171.31,171.13,171.24,1128343,0\n" + "2017-10-06,15:35:00,170.25,170.31,169.75,170.1,664149,0\n" + "2017-10-06,15:40:00,170.08,170.42,169.81,170.25,320783,0\n" + "2017-10-06,15:45:00,170.25,170.86,170.1301,170.775,324838,0\n" + "2017-10-06,15:50:00,170.77,170.99,170.611,170.65,336886,0\n" + "2017-10-06,15:55:00,170.65,170.72,170.3,170.31,157502,0\n" + "2017-10-06,16:00:00,170.31,170.5,170.25,170.495,136683,0\n" + "2017-10-06,16:05:00,170.49,170.76,170.45,170.7,209150,0\n" + "2017-10-06,16:10:00,170.67,170.88,170.57,170.75,166652,0\n" + "2017-10-06,16:15:00,170.7454,170.8,170.56,170.56,184889,0\n" + "2017-10-06,16:20:00,170.56,170.6109,170.39,170.5,117913,0\n" + "2017-10-06,16:25:00,170.5,170.6,170.35,170.57,98916,0\n" + "2017-10-06,16:30:00,170.5734,170.5734,170.34,170.44,125507,0\n" + "2017-10-06,16:35:00,170.45,170.4903,170.36,170.44,96602,0\n" + "2017-10-06,16:40:00,170.44,170.5,170.27,170.43,148571,0\n" + "2017-10-06,16:45:00,170.44,170.475,170.31,170.34,84227,0\n" + "2017-10-06,16:50:00,170.35,170.55,170.34,170.474,87117,0\n" + "2017-10-06,16:55:00,170.46,170.54,170.29,170.32,115809,0\n" + "2017-10-06,17:00:00,170.35,170.35,170.11,170.2599,183249,0\n" + "2017-10-06,17:05:00,170.26,170.47,170.26,170.31,90236,0\n" + "2017-10-06,17:10:00,170.31,170.4272,170.27,170.29,50300,0\n" + "2017-10-06,17:15:00,170.32,170.4,170.3,170.385,54053,0\n" + "2017-10-06,17:20:00,170.39,170.71,170.37,170.66,143121,0\n" + "2017-10-06,17:25:00,170.65,170.71,170.5475,170.7,106767,0\n" + "2017-10-06,17:30:00,170.69,170.85,170.6801,170.8,76303,0\n" + "2017-10-06,17:35:00,170.81,170.85,170.74,170.83,68554,0\n" + "2017-10-06,17:40:00,170.83,170.86,170.66,170.7,93086,0\n" + "2017-10-06,17:45:00,170.695,170.78,170.6,170.7,67186,0\n" + "2017-10-06,17:50:00,170.73,171.05,170.7217,170.99,124157,0\n" + "2017-10-06,17:55:00,170.999,171.1,170.99,171.06,74128,0\n" + "2017-10-06,18:00:00,171.0691,171.351,171.01,171.3,172326,0\n" + "2017-10-06,18:05:00,171.319,171.4,171.13,171.33,172606,0\n" + "2017-10-06,18:10:00,171.36,171.54,171.3,171.4399,147101,0\n" + "2017-10-06,18:15:00,171.4391,171.5,171.26,171.3664,119360,0\n" + "2017-10-06,18:20:00,171.363,171.45,171.32,171.44,54723,0\n" + "2017-10-06,18:25:00,171.445,171.58,171.35,171.57,88315,0\n" + "2017-10-06,18:30:00,171.57,171.78,171.54,171.7639,123191,0\n" + "2017-10-06,18:35:00,171.7623,172.14,171.75,172.08,408140,0\n" + "2017-10-06,18:40:00,172.09,172.25,171.985,172.22,140686,0\n" + "2017-10-06,18:45:00,172.22,172.28,172.04,172.23,91064,0\n" + "2017-10-06,18:50:00,172.22,172.2345,172.13,172.17,188036,0\n" + "2017-10-06,18:55:00,172.1601,172.18,172.05,172.17,112332,0\n" + "2017-10-06,19:00:00,172.1762,172.19,171.99,172.05,131256,0\n" + "2017-10-06,19:05:00,172.0498,172.2,171.8,171.8,219040,0\n" + "2017-10-06,19:10:00,171.81,171.88,171.62,171.77,122858,0\n" + "2017-10-06,19:15:00,171.77,171.84,171.57,171.62,136296,0\n" + "2017-10-06,19:20:00,171.6,171.68,171.56,171.67,108984,0\n" + "2017-10-06,19:25:00,171.67,171.88,171.58,171.8521,127761,0\n" + "2017-10-06,19:30:00,171.8514,171.93,171.64,171.7,95688,0\n" + "2017-10-06,19:35:00,171.72,171.78,171.51,171.53,71837,0\n" + "2017-10-06,19:40:00,171.54,171.61,171.4391,171.61,89620,0\n" + "2017-10-06,19:45:00,171.6199,171.7876,171.56,171.76,72493,0\n" + "2017-10-06,19:50:00,171.76,171.78,171.65,171.65,35393,0\n" + "2017-10-06,19:55:00,171.68,171.7,171.62,171.69,38159,0\n" + "2017-10-06,20:00:00,171.67,171.71,171.62,171.69,29785,0\n" + "2017-10-06,20:05:00,171.68,171.685,171.56,171.57,30352,0\n" + "2017-10-06,20:10:00,171.58,171.7099,171.55,171.67,39764,0\n" + "2017-10-06,20:15:00,171.6601,171.6601,171.52,171.57,51418,0\n" + "2017-10-06,20:20:00,171.5614,171.63,171.54,171.6,49072,0\n" + "2017-10-06,20:25:00,171.5891,171.63,171.54,171.5999,39779,0\n" + "2017-10-06,20:30:00,171.59,171.59,171.36,171.41,70373,0\n" + "2017-10-06,20:35:00,171.44,171.52,171.42,171.52,44849,0\n" + "2017-10-06,20:40:00,171.525,171.57,171.44,171.45,45171,0\n" + "2017-10-06,20:45:00,171.44,171.55,171.41,171.51,38605,0\n" + "2017-10-06,20:50:00,171.501,171.6284,171.501,171.54,57509,0\n" + "2017-10-06,20:55:00,171.54,171.66,171.51,171.63,47831,0\n" + "2017-10-06,21:00:00,171.64,171.71,171.599,171.6728,54993,0\n" + "2017-10-06,21:05:00,171.67,171.75,171.6301,171.72,57250,0\n" + "2017-10-06,21:10:00,171.72,171.79,171.71,171.75,62189,0\n" + "2017-10-06,21:15:00,171.7454,171.77,171.67,171.76,60708,0\n" + "2017-10-06,21:20:00,171.76,171.77,171.55,171.6,91057,0\n" + "2017-10-06,21:25:00,171.5886,171.81,171.5886,171.8013,69765,0\n" + "2017-10-06,21:30:00,171.81,171.82,171.62,171.74,85199,0\n" + "2017-10-06,21:35:00,171.74,171.78,171.66,171.67,49544,0\n" + "2017-10-06,21:40:00,171.6636,171.8,171.63,171.79,64271,0\n" + "2017-10-06,21:45:00,171.8,171.99,171.79,171.965,156700,0\n" + "2017-10-06,21:50:00,171.96,172.1,171.9,171.93,270150,0\n" + "2017-10-06,21:55:00,171.95,172.25,171.95,172.24,287810,0\n" + "2017-10-06,22:00:00,172.24,172.37,172.16,172.23,1062537,0";
String[] dataLine = rawData_5_minutes.split("\n");
List<Bar> bars = new ArrayList<>();
for (int i = 0; i < dataLine.length; i++) {
String[] barData = dataLine[i].split(",");
ZonedDateTime date = ZonedDateTime.parse(barData[0] + " " + barData[1] + " PST", DateTimeFormatter.ofPattern("yyyy-MM-dd H:m:s z"));
double open = Double.parseDouble(barData[2]);
double high = Double.parseDouble(barData[3]);
double low = Double.parseDouble(barData[4]);
double close = Double.parseDouble(barData[5]);
double volume = Double.parseDouble(barData[6]);
bars.add(new BaseBar(date, open, high, low, close, volume));
}
series_5_minutes = new BaseTimeSeries("FB_5_minutes", bars);
}
use of org.ta4j.core.BaseBar in project ta4j by ta4j.
the class PivotPointIndicatorTest method initDataForWeeklyTimeFrame.
@Before
public void initDataForWeeklyTimeFrame() {
String rawData_1_hours = "2017-09-01,16:00:00,172.4,172.55,171.58,171.8,2204582,0\n" + "2017-09-01,17:00:00,171.79,172.49,171.31,172.43,1870246,0\n" + "2017-09-01,18:00:00,172.42,172.84,172.24,172.74,1264679,0\n" + "2017-09-01,19:00:00,172.74,172.915,172.34,172.37,987869,0\n" + "2017-09-01,20:00:00,172.37,172.4803,171.995,172.2189,1159335,0\n" + "2017-09-01,21:00:00,172.2174,172.3593,171.85,172.0151,830724,0\n" + "2017-09-01,22:00:00,172.03,172.39,171.92,172.02,1777758,0\n" + "2017-09-05,16:00:00,171.27,172.22,170.7301,172.08,1685421,0\n" + "2017-09-05,17:00:00,172.0731,172.3875,171.36,171.51,1879301,0\n" + "2017-09-05,18:00:00,171.49,171.5,170.95,171.21,1231823,0\n" + "2017-09-05,19:00:00,171.19,171.19,169.88,170.319,1724213,0\n" + "2017-09-05,20:00:00,170.27,170.47,169.55,170.45,1321590,0\n" + "2017-09-05,21:00:00,170.43,170.9,170.21,170.6003,1174472,0\n" + "2017-09-05,22:00:00,170.61,170.95,170.43,170.72,2004332,0\n" + "2017-09-06,16:00:00,170.91,171.49,170.76,171.25,1420276,0\n" + "2017-09-06,17:00:00,171.25,171.25,169.65,170.31,2110723,0\n" + "2017-09-06,18:00:00,170.34,170.64,169.57,170.52,1391833,0\n" + "2017-09-06,19:00:00,170.515,171.44,170.45,171.4211,1314133,0\n" + "2017-09-06,20:00:00,171.43,171.64,171.28,171.37,1127506,0\n" + "2017-09-06,21:00:00,171.38,172.04,171.33,171.98,1654536,0\n" + "2017-09-06,22:00:00,171.98,172.48,171.84,172.09,2815393,0\n" + "2017-09-07,16:00:00,171.94,172.05,170.57,170.64,2387691,0\n" + "2017-09-07,17:00:00,170.65,171.18,170.27,171.015,3142555,0\n" + "2017-09-07,18:00:00,171.03,172.49,171.03,172.36,2440694,0\n" + "2017-09-07,19:00:00,172.355,172.73,171.91,172.5,2437801,0\n" + "2017-09-07,20:00:00,172.48,172.87,172.299,172.78,1410186,0\n" + "2017-09-07,21:00:00,172.77,172.99,172.63,172.94,1279331,0\n" + "2017-09-07,22:00:00,172.94,173.3067,172.72,173.21,2543650,0\n" + "2017-09-08,16:00:00,173.09,173.49,172.69,172.991,1459655,0\n" + "2017-09-08,17:00:00,173.02,173.1,172.25,172.66,1354956,0\n" + "2017-09-08,18:00:00,172.66,172.95,172.14,172.21,1075148,0\n" + "2017-09-08,19:00:00,172.22,172.35,171.71,171.879,1197265,0\n" + "2017-09-08,20:00:00,171.88,172.13,171.42,171.435,959896,0\n" + "2017-09-08,21:00:00,171.44,171.51,171.11,171.24,893674,0\n" + "2017-09-08,22:00:00,171.27,171.35,170.8,170.95,1654448,0\n" + "2017-09-11,16:00:00,172.4,173.47,172.2,173.4,2569917,0\n" + "2017-09-11,17:00:00,173.39,173.89,172.88,172.95,1985972,0\n" + "2017-09-11,18:00:00,172.93,173.29,172.66,173.12,1249627,0\n" + "2017-09-11,19:00:00,173.14,173.465,173,173.2925,846283,0\n" + "2017-09-11,20:00:00,173.3,173.62,173.19,173.475,796323,0\n" + "2017-09-11,21:00:00,173.49,173.58,173.21,173.4029,700101,0\n" + "2017-09-11,22:00:00,173.4,173.69,173.23,173.51,2247054,0\n" + "2017-09-12,16:00:00,173.76,174,172.62,172.95,1600694,0\n" + "2017-09-12,17:00:00,172.94,172.97,172.29,172.8485,1850525,0\n" + "2017-09-12,18:00:00,172.83,173.06,172.5,172.5375,913774,0\n" + "2017-09-12,19:00:00,172.54,172.82,172.33,172.55,811710,0\n" + "2017-09-12,20:00:00,172.55,172.64,172.31,172.3779,756646,0\n" + "2017-09-12,21:00:00,172.37,172.51,171.75,172.18,1296421,0\n" + "2017-09-12,22:00:00,172.1899,172.95,171.96,172.95,1853689,0\n" + "2017-09-13,16:00:00,173.01,173.06,172.06,172.79,1219091,0\n" + "2017-09-13,17:00:00,172.8,172.99,172.36,172.66,1353380,0\n" + "2017-09-13,18:00:00,172.68,172.79,172.1307,172.29,929711,0\n" + "2017-09-13,19:00:00,172.28,172.88,172.27,172.85,600868,0\n" + "2017-09-13,20:00:00,172.84,172.92,172.26,172.71,1141623,0\n" + "2017-09-13,21:00:00,172.73,172.91,172.62,172.76,690702,0\n" + "2017-09-13,22:00:00,172.77,173.17,172.64,173.05,1951351,0\n" + "2017-09-14,16:00:00,172.26,172.28,170.5,171.48,3413922,0\n" + "2017-09-14,17:00:00,171.47,172,171.31,171.86,2025746,0\n" + "2017-09-14,18:00:00,171.86,171.95,171.38,171.44,1295512,0\n" + "2017-09-14,19:00:00,171.4383,171.53,170.7701,171.36,1573507,0\n" + "2017-09-14,20:00:00,171.38,171.585,170.98,171.07,880249,0\n" + "2017-09-14,21:00:00,171.07,171.32,170.97,171.1276,1000415,0\n" + "2017-09-14,22:00:00,171.135,171.2644,170.84,170.96,3505708,0\n" + "2017-09-15,16:00:00,170.88,171.35,170.26,171.02,4626553,0\n" + "2017-09-15,17:00:00,171.02,172.34,170.81,171.9,2152852,0\n" + "2017-09-15,18:00:00,171.9014,172.01,171.4,171.59,922110,0\n" + "2017-09-15,19:00:00,171.59,171.84,171.5,171.69,698595,0\n" + "2017-09-15,20:00:00,171.69,171.79,171.45,171.6,489550,0\n" + "2017-09-15,21:00:00,171.5912,171.75,171.3914,171.72,453983,0\n" + "2017-09-15,22:00:00,171.73,171.78,171.32,171.58,3372272,0\n" + "2017-09-18,16:00:00,171.99,172.07,171.27,171.82,1238452,0\n" + "2017-09-18,17:00:00,171.86,171.9402,171.14,171.16,1435108,0\n" + "2017-09-18,18:00:00,171.155,171.58,171.14,171.375,1034295,0\n" + "2017-09-18,19:00:00,171.375,171.54,170.892,171.24,1068328,0\n" + "2017-09-18,20:00:00,171.24,171.25,170.8,170.96,917132,0\n" + "2017-09-18,21:00:00,170.9583,171.03,169.34,169.8168,2447027,0\n" + "2017-09-18,22:00:00,169.8199,170.26,169.79,170.01,1899851,0\n" + "2017-09-19,16:00:00,170.62,171.82,170.36,171.04,2666461,0\n" + "2017-09-19,17:00:00,171.06,171.55,170.86,171.54,1519011,0\n" + "2017-09-19,18:00:00,171.5411,172,171.12,171.74,1296463,0\n" + "2017-09-19,19:00:00,171.735,172.24,171.7,171.783,995548,0\n" + "2017-09-19,20:00:00,171.77,171.81,171.52,171.63,595006,0\n" + "2017-09-19,21:00:00,171.63,172.17,171.63,171.8874,894959,0\n" + "2017-09-19,22:00:00,171.88,172.56,171.77,172.52,3361600,0\n" + "2017-09-20,16:00:00,172.5,173.05,171.91,172.436,1532373,0\n" + "2017-09-20,17:00:00,172.49,172.5,170.91,170.94,1882462,0\n" + "2017-09-20,18:00:00,170.99,171.91,170.7,171.42,1754497,0\n" + "2017-09-20,19:00:00,171.43,172.0499,171.37,171.74,701282,0\n" + "2017-09-20,20:00:00,171.75,172.34,171.68,172.2068,595816,0\n" + "2017-09-20,21:00:00,172.2,172.3228,170.8901,171.67,1933222,0\n" + "2017-09-20,22:00:00,171.67,172.37,171.38,172.17,2321029,0\n" + "2017-09-21,16:00:00,171.69,171.78,170.11,170.4176,1923218,0\n" + "2017-09-21,17:00:00,170.41,170.95,170.01,170.645,1802748,0\n" + "2017-09-21,18:00:00,170.64,172.27,170.63,171.79,1898152,0\n" + "2017-09-21,19:00:00,171.83,172.17,171.57,171.735,744466,0\n" + "2017-09-21,20:00:00,171.76,172.19,171.71,171.9,603496,0\n" + "2017-09-21,21:00:00,171.9,172.09,171.53,171.93,732452,0\n" + "2017-09-21,22:00:00,171.93,172.02,171.1,171.11,1549501,0\n" + "2017-09-22,16:00:00,170.21,171.7,170.2,171.04,1528102,0\n" + "2017-09-22,17:00:00,171.09,171.73,170.61,170.66,1213718,0\n" + "2017-09-22,18:00:00,170.67,170.9,170.3,170.4544,1129049,0\n" + "2017-09-22,19:00:00,170.455,170.4999,169.69,169.72,1486495,0\n" + "2017-09-22,20:00:00,169.7246,170.18,169.22,169.955,1306114,0\n" + "2017-09-22,21:00:00,169.97,170.6157,169.81,170.2223,1009723,0\n" + "2017-09-22,22:00:00,170.24,170.66,169.97,170.54,2891812,0\n" + "2017-09-25,16:00:00,169.24,169.3,164.25,164.5,7673085,0\n" + "2017-09-25,17:00:00,164.5,165.7,164.11,164.56,8126863,0\n" + "2017-09-25,18:00:00,164.55,164.99,163.89,164.3,3986187,0\n" + "2017-09-25,19:00:00,164.306,164.3618,162.78,163.9401,3761738,0\n" + "2017-09-25,20:00:00,163.945,164.1,162.8,163.1555,2185387,0\n" + "2017-09-25,21:00:00,163.155,163.28,161.56,162.72,4213188,0\n" + "2017-09-25,22:00:00,162.72,163.19,162.32,162.87,6664367,0\n" + "2017-09-26,16:00:00,164.5,164.88,163.53,163.9538,3979814,0\n" + "2017-09-26,17:00:00,163.95,165.39,163.33,163.485,4087164,0\n" + "2017-09-26,18:00:00,163.47,163.6,162.78,163.01,2683532,0\n" + "2017-09-26,19:00:00,163.01,164.35,163,164.1278,2086545,0\n" + "2017-09-26,20:00:00,164.13,165.5,164.103,165.03,2472074,0\n" + "2017-09-26,21:00:00,165.02,165.24,164.3,164.4132,1656648,0\n" + "2017-09-26,22:00:00,164.415,164.99,164.1,164.21,2410436,0\n" + "2017-09-27,16:00:00,165.9,167.14,165.57,166.74,3913309,0\n" + "2017-09-27,17:00:00,166.73,166.95,165.86,166.67,2198970,0\n" + "2017-09-27,18:00:00,166.64,166.74,166.2,166.41,1063139,0\n" + "2017-09-27,19:00:00,166.43,166.82,166.14,166.82,903477,0\n" + "2017-09-27,20:00:00,166.83,167.29,166.7794,167.25,1332143,0\n" + "2017-09-27,21:00:00,167.25,168.18,167.24,167.77,2455149,0\n" + "2017-09-27,22:00:00,167.78,168.34,167.63,167.68,3912593,0\n" + "2017-09-28,16:00:00,167.94,168.399,167.16,168.11,2261661,0\n" + "2017-09-28,17:00:00,168.09,169.0696,168.06,168.6196,2146271,0\n" + "2017-09-28,18:00:00,168.6173,168.87,167.99,168.16,1329327,0\n" + "2017-09-28,19:00:00,168.17,168.31,167.79,168.1,969834,0\n" + "2017-09-28,20:00:00,168.1167,168.69,167.26,168.58,1138931,0\n" + "2017-09-28,21:00:00,168.58,168.665,168.12,168.44,714588,0\n" + "2017-09-28,22:00:00,168.45,168.82,168,168.73,1884493,0\n" + "2017-09-29,16:00:00,168.83,169.89,168.81,169.5,2110580,0\n" + "2017-09-29,17:00:00,169.56,170.88,169.38,170.68,2446081,0\n" + "2017-09-29,18:00:00,170.6764,170.96,170.34,170.58,1512859,0\n" + "2017-09-29,19:00:00,170.585,171.39,170.5,171.35,1490295,0\n" + "2017-09-29,20:00:00,171.3468,171.66,171.11,171.2,1162494,0\n" + "2017-09-29,21:00:00,171.2042,171.29,170.48,170.64,968716,0\n" + "2017-09-29,22:00:00,170.64,170.97,170.28,170.81,2244755,0\n" + "2017-10-02,16:00:00,171.39,171.87,170.37,170.8,2421692,0\n" + "2017-10-02,17:00:00,170.77,171.0629,170.25,170.73,1573368,0\n" + "2017-10-02,18:00:00,170.73,170.915,169.1,169.1827,1717024,0\n" + "2017-10-02,19:00:00,169.18,169.7,168.75,169.59,1393249,0\n" + "2017-10-02,20:00:00,169.59,169.8856,169.47,169.65,778156,0\n" + "2017-10-02,21:00:00,169.65,170.33,169.53,169.83,1144629,0\n" + "2017-10-02,22:00:00,169.82,169.98,169.25,169.47,2400863,0\n" + "2017-10-03,16:00:00,169.3,170.73,169.2,170.59,1585661,0\n" + "2017-10-03,17:00:00,170.59,170.7,169.44,170.3365,1546335,0\n" + "2017-10-03,18:00:00,170.32,170.578,169.97,170.0568,651114,0\n" + "2017-10-03,19:00:00,170.06,170.265,169.82,169.98,675029,0\n" + "2017-10-03,20:00:00,169.9769,170.1,169.83,169.989,517457,0\n" + "2017-10-03,21:00:00,169.97,170.255,169.96,170.08,452166,0\n" + "2017-10-03,22:00:00,170.087,170.17,169.76,169.96,1579778,0\n" + "2017-10-04,16:00:00,169.83,170.24,169.12,169.786,1401682,0\n" + "2017-10-04,17:00:00,169.785,170.65,169.6001,170.359,1426202,0\n" + "2017-10-04,18:00:00,170.36,170.67,170.0277,170.09,1010196,0\n" + "2017-10-04,19:00:00,170.0844,170.54,169.9,169.95,740658,0\n" + "2017-10-04,20:00:00,169.95,170.0011,168.89,169.31,1764720,0\n" + "2017-10-04,21:00:00,169.31,169.49,169.05,169.22,1023139,0\n" + "2017-10-04,22:00:00,169.219,169.43,168.29,168.42,2940100,0\n" + "2017-10-05,16:00:00,169.18,169.75,168.76,168.82,1952432,0\n" + "2017-10-05,17:00:00,168.79,169.63,168.6,168.66,2317129,0\n" + "2017-10-05,18:00:00,168.67,169.25,168.65,168.935,1050783,0\n" + "2017-10-05,19:00:00,168.92,170.75,168.9199,170.6,2133708,0\n" + "2017-10-05,20:00:00,170.59,170.89,170.38,170.64,1117746,0\n" + "2017-10-05,21:00:00,170.63,170.9,170.45,170.76,769947,0\n" + "2017-10-05,22:00:00,170.76,171.31,170.75,171.24,3030774,0\n" + "2017-10-06,16:00:00,170.25,170.99,169.75,170.495,1940841,0\n" + "2017-10-06,17:00:00,170.49,170.88,170.11,170.2599,1618602,0\n" + "2017-10-06,18:00:00,170.26,171.351,170.26,171.3,1120217,0\n" + "2017-10-06,19:00:00,171.319,172.28,171.13,172.05,1776810,0\n" + "2017-10-06,20:00:00,172.0498,172.2,171.4391,171.69,1147914,0\n" + "2017-10-06,21:00:00,171.68,171.71,171.36,171.6728,569716,0\n" + "2017-10-06,22:00:00,171.67,172.37,171.55,172.23,2317180,0";
String[] dataLine = rawData_1_hours.split("\n");
List<Bar> bars = new ArrayList<>();
for (int i = 0; i < dataLine.length; i++) {
String[] barData = dataLine[i].split(",");
ZonedDateTime date = ZonedDateTime.parse(barData[0] + " " + barData[1] + " PST", DateTimeFormatter.ofPattern("yyyy-MM-dd H:m:s z"));
double open = Double.parseDouble(barData[2]);
double high = Double.parseDouble(barData[3]);
double low = Double.parseDouble(barData[4]);
double close = Double.parseDouble(barData[5]);
double volume = Double.parseDouble(barData[6]);
bars.add(new BaseBar(date, open, high, low, close, volume));
}
series_1_hours = new BaseTimeSeries("FB_1_hours", bars);
}
Aggregations