public override void loadData() { if (isLoading) { return; } if (base.SelectedItemData == null) { return; } if (string.IsNullOrEmpty(base.SelectedItemData.Code)) { return; } string itemCode = base.SelectedItemData.Code; string selectedType = this.SelectedType; if (string.IsNullOrEmpty(selectedType)) { selectedType = SharedData.SelectedType; } isLoading = true; List <S_CandleItemData> sourceDatas = LoadData(itemCode, selectedType); isLoading = false; if (sourceDatas == null || sourceDatas.Count == 0) { return; } var averageDatas = PPUtils.GetBalancedAverageDatas(itemCode, sourceDatas, 9); var averageDatas2 = PPUtils.GetMovingAverageDurationFlow(itemCode, averageDatas, isStrengthed, inflectionPoint); var sourceDatas2 = PPUtils.GetDurationSum(itemCode, averageDatas2, sourceDatas); chart.LoadDataAndApply(itemCode, sourceDatas2, base.timeInterval, 9); chart2.LoadDataAndApply(itemCode, averageDatas2, base.timeInterval, 9); chart2.SetYFormat("N0"); }
public override void loadData() { if (base.SelectedItemData == null) { return; } if (string.IsNullOrEmpty(base.SelectedItemData.Code)) { return; } string itemCode = base.SelectedItemData.Code; var sourceDatas = PPContext.Instance.ClientContext.GetCandleSourceDataOrderByAsc( itemCode , base.timeInterval); if (sourceDatas == null || sourceDatas.Count == 0) { return; } //표시할 갯수를 맞춘다. //RemoveSourceData(sourceDatas); bool isUseWhim = false; if (isUseWhim) { double rate = 0.0; if (timeInterval == TimeIntervalEnum.Week) { rate = 2.5; } if (timeInterval == TimeIntervalEnum.Day) { rate = 1.0; } if (timeInterval == TimeIntervalEnum.Hour_03) { rate = 0.7; } if (timeInterval == TimeIntervalEnum.Hour_02) { rate = 0.5; } if (timeInterval == TimeIntervalEnum.Hour_01) { rate = 0.3; } sourceDatas = PPUtils.GetRecreateWhimDatas(itemCode, sourceDatas, true, rate, null); } List <S_CandleItemData> averageDatas = null; if (averageType == "일반") { averageDatas = PPUtils.GetAverageDatas(itemCode, sourceDatas, 9); } else if (averageType == "밸런스") { averageDatas = PPUtils.GetBalancedAverageDatas(itemCode, sourceDatas, 9); } else //if (averageType == "가중") { averageDatas = PPUtils.GetAccumulatedAverageDatas(itemCode, sourceDatas, 9); } var averageDatas2 = PPUtils.GetMovingAverageDurationFlow(itemCode, averageDatas, isStrengthed, inflectionPoint); var sourceDatas2 = PPUtils.GetDurationSum(itemCode, averageDatas2, sourceDatas); chart.LoadDataAndApply(itemCode, sourceDatas2, base.timeInterval, 9); chart2.LoadDataAndApply(itemCode, averageDatas2, base.timeInterval, 9); chart2.SetYFormat("N0"); }