Search in sources :

Example 16 with BaseTradingRecord

use of org.ta4j.core.BaseTradingRecord in project ta4j by ta4j.

the class StopGainRuleTest method setUp.

@Before
public void setUp() {
    tradingRecord = new BaseTradingRecord();
    closePrice = new ClosePriceIndicator(new MockTimeSeries(100, 105, 110, 120, 150, 120, 160, 180));
}
Also used : BaseTradingRecord(org.ta4j.core.BaseTradingRecord) MockTimeSeries(org.ta4j.core.mocks.MockTimeSeries) ClosePriceIndicator(org.ta4j.core.indicators.helpers.ClosePriceIndicator) Before(org.junit.Before)

Example 17 with BaseTradingRecord

use of org.ta4j.core.BaseTradingRecord in project ta4j by ta4j.

the class StopLossRuleTest method setUp.

@Before
public void setUp() {
    tradingRecord = new BaseTradingRecord();
    closePrice = new ClosePriceIndicator(new MockTimeSeries(100, 105, 110, 120, 100, 150, 110, 100));
}
Also used : BaseTradingRecord(org.ta4j.core.BaseTradingRecord) MockTimeSeries(org.ta4j.core.mocks.MockTimeSeries) ClosePriceIndicator(org.ta4j.core.indicators.helpers.ClosePriceIndicator) Before(org.junit.Before)

Aggregations

BaseTradingRecord (org.ta4j.core.BaseTradingRecord)17 MockTimeSeries (org.ta4j.core.mocks.MockTimeSeries)17 Test (org.junit.Test)15 TradingRecord (org.ta4j.core.TradingRecord)12 TimeSeries (org.ta4j.core.TimeSeries)11 Before (org.junit.Before)2 AnalysisCriterion (org.ta4j.core.AnalysisCriterion)2 ExternalCriterionTest (org.ta4j.core.ExternalCriterionTest)2 ClosePriceIndicator (org.ta4j.core.indicators.helpers.ClosePriceIndicator)2 MockBar (org.ta4j.core.mocks.MockBar)1