private void PopulateIndicator(Screen2.Entity.Indicator ind, Ticker ticker) { ind.Close = ticker.Close; ind.Open = ticker.Open; ind.High = ticker.High; ind.Low = ticker.Low; ind.Volumn = ticker.Volumn; ind.AdjustedClose = ticker.AdjustedClose; }
private int?GetDayByTradingDate(Screen2.Entity.Indicator[] inds, Screen2.Entity.Indicator ind) { int index = 0; for (int i = 0; i < inds.Length; i++) { if (inds[i].TradingDate == ind.TradingDate) { index = i + 1; break; } } return(index); }
private void HasProfitted(Screen2.Entity.Indicator ind, ScanVerification v, Screen2.Entity.Indicator[] inds) { v.HasProfitted = false; for (int i = 0; i < inds.Length; i++) { if (inds[i].Low < v.StopLine) { v.StopDay = i + 1; break; } else if (inds[i].High > (profitValue)) { v.HasProfitted = true; v.ProfitDay = i + 1; break; } } }