public int GetIdouheikinPoint(AveSteps _aveStep, ChartScales _chartScale, int n) { List <List <int> > Idouheikins; Idouheikins = IdouheikinScales[(int)_aveStep]; return(Idouheikins[(int)_chartScale][n]); }
private void AveStepChangeOnClick(AveSteps aveStep) { this.NormalToolStripMenuItem.CheckedChanged -= new System.EventHandler(this.NormalToolStripMenuItem_CheckedChanged); this.AibaToolStripMenuItem.CheckedChanged -= new System.EventHandler(this.AibaToolStripMenuItem_CheckedChanged); MyConfig.AveStep = aveStep; switch (aveStep) { case AveSteps.Normal: NormalToolStripMenuItem.Checked = true; AibaToolStripMenuItem.Checked = false; userSettingToolStripMenuItem.Checked = false; NormalToolStripMenuItem.CheckOnClick = false; AibaToolStripMenuItem.CheckOnClick = true; userSettingToolStripMenuItem.CheckOnClick = true; 標準ToolStripMenuItem.Checked = true; 相場師朗式ToolStripMenuItem.Checked = false; userSettingMenuItem1.Checked = false; break; case AveSteps.Aiba: AibaToolStripMenuItem.Checked = true; NormalToolStripMenuItem.Checked = false; userSettingToolStripMenuItem.Checked = false; AibaToolStripMenuItem.CheckOnClick = false; NormalToolStripMenuItem.CheckOnClick = true; userSettingMenuItem1.CheckOnClick = true; 標準ToolStripMenuItem.Checked = false; 相場師朗式ToolStripMenuItem.Checked = true; userSettingMenuItem1.Checked = false; break; case AveSteps.User: AibaToolStripMenuItem.Checked = false; NormalToolStripMenuItem.Checked = false; userSettingToolStripMenuItem.Checked = true; AibaToolStripMenuItem.CheckOnClick = true; NormalToolStripMenuItem.CheckOnClick = true; userSettingMenuItem1.CheckOnClick = false; 標準ToolStripMenuItem.Checked = false; 相場師朗式ToolStripMenuItem.Checked = false; userSettingMenuItem1.Checked = true; break; } this.NormalToolStripMenuItem.CheckedChanged += new System.EventHandler(this.NormalToolStripMenuItem_CheckedChanged); this.AibaToolStripMenuItem.CheckedChanged += new System.EventHandler(this.AibaToolStripMenuItem_CheckedChanged); }
/// <summary> /// 株価テーブル作成 /// </summary> /// <param name="plotEnd"></param> /// <param name="plotWide"></param> public void MakeTable(int plotEnd, int plotWide, ChartScales chartScale, AveSteps aveStep) { // 株価テーブル作成 var calendar = new ActiveMarket.Calendar(); var _kabukaRow = new KabukaRow(); int?_datePos = plotEnd; this.PlotWide = plotWide; this.ChartScale = chartScale; this.AveStep = aveStep; OwarineList = new List <Owarine>(); PriceTable.Clear(); var cnt = 0; while (cnt < this.PlotWide) { if (_datePos.Value < Price.Begin()) { break; } _kabukaRow = GetOneRow(_datePos.Value); if (_kabukaRow != null) { DataRow row = PriceTable.NewRow(); row["StartPos"] = _kabukaRow.StartPos; row["EndPos"] = _kabukaRow.EndPos; row["StartDate"] = _kabukaRow.StartDate; row["EndDate"] = _kabukaRow.EndDate; row["High"] = _kabukaRow.High; row["Low"] = _kabukaRow.Low; row["Open"] = _kabukaRow.Open; row["Close"] = _kabukaRow.Close; row["Heikin1"] = 0; row["Heikin2"] = 0; row["Heikin3"] = 0; row["Heikin4"] = 0; row["Heikin5"] = 0; PriceTable.Rows.Add(row); OwarineList.Add(new Owarine(_kabukaRow.EndPos, _kabukaRow.Close)); cnt++; } _datePos = NextDatePosition(_datePos.Value, Directions.Befor); if (!_datePos.HasValue) { break; } } // 終値リストの作成(PlotStart以前300件) var MaxCount = 300; _datePos = OwarineList.Select(n => n.DatePos).Min(); cnt = 0; for (var i = 0; i < MaxCount; i++) { _datePos = NextDatePosition(_datePos.Value, Directions.Befor); if (!_datePos.HasValue) { break; } OwarineList.Add(new Owarine(_datePos.Value, Price.Close(_datePos.Value))); } for (var i = 0; i < PtCount; i++) { for (var j = 0; j < 5; j++) { SetHeikin(i, j); } } }