use of org.ta4j.core.trading.rules.FixedRule in project ta4j by ta4j.
the class TimeSeriesTest method setUp.
// it is purposed to test the deprecated sub series creation
@SuppressWarnings("deprecation")
@Before
public void setUp() {
bars = new LinkedList<>();
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 13, 0, 0, 0, 0, ZoneId.systemDefault()), 1d));
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 14, 0, 0, 0, 0, ZoneId.systemDefault()), 2d));
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 15, 0, 0, 0, 0, ZoneId.systemDefault()), 3d));
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 20, 0, 0, 0, 0, ZoneId.systemDefault()), 4d));
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 25, 0, 0, 0, 0, ZoneId.systemDefault()), 5d));
bars.add(new MockBar(ZonedDateTime.of(2014, 6, 30, 0, 0, 0, 0, ZoneId.systemDefault()), 6d));
defaultName = "Series Name";
defaultSeries = new BaseTimeSeries(defaultName, bars);
constrainedSeries = new BaseTimeSeries(defaultSeries, 2, 4);
emptySeries = new BaseTimeSeries();
Strategy strategy = new BaseStrategy(new FixedRule(0, 2, 3, 6), new FixedRule(1, 4, 7, 8));
// Strategy would need a real test class
strategy.setUnstablePeriod(2);
}
Aggregations