You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
47 lines
1.1 KiB
47 lines
1.1 KiB
package com.deepchart.service.impl;
|
|
|
|
import com.deepchart.entity.StockDailyData;
|
|
import com.deepchart.entity.StockInfo;
|
|
import com.deepchart.service.IndexService;
|
|
import com.deepchart.utils.*;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
import java.util.List;
|
|
|
|
@Service
|
|
public class IndexServiceImpl implements IndexService {
|
|
|
|
@Autowired
|
|
private StockDataUtil stockDataUtil;
|
|
|
|
@Override
|
|
public List<StockDailyData> getStockData(StockInfo stock) {
|
|
return stockDataUtil.getStockData(stock);
|
|
}
|
|
|
|
@Override
|
|
public String macd(List<StockDailyData> list) {
|
|
return MACDUtil.analyzeStock(list);
|
|
}
|
|
|
|
@Override
|
|
public String ma(List<StockDailyData> list) {
|
|
return MAUtil.analyzeMA(list);
|
|
}
|
|
|
|
@Override
|
|
public String cci(List<StockDailyData> list) {
|
|
return CCIUtil.analyzeCCI(list);
|
|
}
|
|
|
|
@Override
|
|
public String expma(List<StockDailyData> list) {
|
|
return EXPMAUtil.analyzeEXPMA(list,12,40);
|
|
}
|
|
|
|
@Override
|
|
public String wr(List<StockDailyData> list) {
|
|
return WRUtil.analyzeWR(list);
|
|
}
|
|
}
|