| | |
| | | */ |
| | | package com.xcong.excoin.modules.okxNewPrice.indicator.macdAndMatrategy; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * MACD计算结果封装类 |
| | | * 使用@Data注解自动生成getter、setter、equals、hashCode和toString方法 |
| | | */ |
| | | @Data |
| | | public class MACDResult { |
| | | /** MACD完整数据序列,包含每个价格点对应的DIF、DEA和MACD柱状图值 */ |
| | | private List<PriceData> macdData; |
| | |
| | | this.macdData = result; |
| | | this.startIndex = startIdx; |
| | | } |
| | | |
| | | /** |
| | | * 获取MACD数据序列 |
| | | * @return MACD数据序列 |
| | | */ |
| | | public List<PriceData> getMacdData() { |
| | | return macdData; |
| | | } |
| | | |
| | | /** |
| | | * 获取起始索引 |
| | | * @return 起始索引值 |
| | | */ |
| | | public int getStartIndex() { |
| | | return startIndex; |
| | | } |
| | | } |