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

2 weeks ago
2 weeks ago
2 weeks ago
  1. package com.deepchart.service.impl;
  2. import com.deepchart.entity.StockDailyData;
  3. import com.deepchart.entity.StockInfo;
  4. import com.deepchart.service.IndexService;
  5. import com.deepchart.utils.*;
  6. import org.springframework.beans.factory.annotation.Autowired;
  7. import org.springframework.stereotype.Service;
  8. import java.util.List;
  9. @Service
  10. public class IndexServiceImpl implements IndexService {
  11. @Autowired
  12. private StockDataUtil stockDataUtil;
  13. @Override
  14. public List<StockDailyData> getStockData(StockInfo stock) {
  15. return stockDataUtil.getStockData(stock);
  16. }
  17. @Override
  18. public String macd(List<StockDailyData> list) {
  19. return MACDUtil.analyzeStock(list);
  20. }
  21. @Override
  22. public String ma(List<StockDailyData> list) {
  23. return MAUtil.analyzeMA(list);
  24. }
  25. @Override
  26. public String cci(List<StockDailyData> list) {
  27. return CCIUtil.analyzeCCI(list);
  28. }
  29. @Override
  30. public String expma(List<StockDailyData> list) {
  31. return EXPMAUtil.analyzeEXPMA(list,12,40);
  32. }
  33. @Override
  34. public String wr(List<StockDailyData> list) {
  35. return WRUtil.analyzeWR(list);
  36. }
  37. }