public string AddPerson(string FirstName, string SecondName, string Email, string Password) { if (Email.Length < 8 || Email.Contains("@") == false || Email.Contains(".") == false) { return("Wrong email"); } if (Password.Length < 8) { return("Password must have minimum 8 sumvols"); } if (FirstName.Length == 0 || SecondName.Length == 0) { return("You need input FirstName and SecondName"); } if (ClassWork.AddPerson(new Person() { Email = Email, Password = Password, FirstName = FirstName, SecondName = SecondName }) == true) { return("Person is create"); } else { return("Email was in db or something wrong"); } }
public string AddLot(string Name, string About, int StartPrice, DateTime Start, DateTime Finish, byte[] Img = null) { if (person == null) { return("Authorization!!!"); } if (StartPrice <= 0) { return("Start price must be up 0"); } if (Finish < Start || Start < DateTime.Now) { return("Input true date and time"); } if (Name.Length == 0 || About.Length == 0) { return("Input name and about"); } if (ClassWork.AddLot(new Lot() { About = About, LotName = Name, StartPrice = StartPrice, TimeStart = Start, TimeFinish = Finish, Photo = Img }, person) == true) { return("Lot is add"); } else { return("Something wrong"); } }
public string TellMeAboutStartLot(int LotId) { if (ClassWork.TellMeAboutStartLot(person, LotId) == true) { return("All ok"); } return("Somethimg wrong"); }
public string Bet(int lotId, int money) { if (person == null) { return("Authorization!!!"); } return(ClassWork.Bet(person, lotId, money)); }
public ActionResult Classwork(int id) { ClassWork model = new ClassWork { CourseId = id }; return(View(model)); }
public ActionResult Grades(int id) { ClassWork classwork = db.ClassWorks.Find(id); if (classwork == null) { return(HttpNotFound()); } Course course = db.Courses.Find(classwork.CourseId); List <Student> students = course.Students.ToList(); List <Grade> grades = db.Grades.Where(m => m.ClassWorkId == id).ToList(); GradeViewModel model = new GradeViewModel(); model.CourseId = course.CourseId; model.CourseName = course.CourseName; model.ClassWorkName = classwork.ClassWorkName; model.ClassWorkId = classwork.ClassWorkId; model.MaxMarks = classwork.MaxMark; model.Grades = new List <Grade>(); foreach (Student student in students) { bool found = false; foreach (Grade grade in grades) { if (grade.StudentId == student.StudentId) { model.Grades.Add(grade); found = true; break; } } if (found) { continue; } Grade newGrade = new Grade { ClassWorkId = classwork.ClassWorkId, FirstName = student.FirstName, LastName = student.LastName, Marks = "", Comment = "", StudentId = student.StudentId, CourseName = course.CourseName, ClassWorkName = classwork.ClassWorkName }; db.Grades.Add(newGrade); model.Grades.Add(newGrade); } db.SaveChanges(); return(View(model)); }
public string Authorization(string email, string password) { person = ClassWork.Authorization(email, password); if (person == null) { return("Wrong email or password"); } return("Authorization"); }
public List <Lot> OldLots() { List <Lot> Lots = ClassWork.OldLots(); foreach (Lot lot in Lots) { lot.History = null; lot.TellPersonsAboutStart = null; } return(Lots); }
public string Bet(int lotId, int money) { if (person == null) { return("Authorization!!!"); } if (ClassWork.Bet(person, lotId, money) == true) { return("All ok"); } return("Something wrong"); }
public string AddPerson(string FirstName, string SecondName, string Email, string Password, bool Gender = false, byte[] Img = null) { if (Email.Length < 8 || Email.Contains("@") == false || Email.Contains(".") == false) { return("Wrong email"); } if (Password.Length < 8) { return("Password must have minimum 8 sumvols"); } if (FirstName.Length == 0 || SecondName.Length == 0) { return("You need input FirstName and SecondName"); } return(ClassWork.AddPerson(new Person() { Email = Email, Password = Password, FirstName = FirstName, SecondName = SecondName, Gender = Gender, Image = Img })); }
public List <Lot> FutureLots() { try { //List<Lot> Lots = ClassWork.FutureLots(); //foreach (Lot lot in Lots) //{ // lot.WhoSale.Password = null; // lot.History = null; // lot.Tells = null; // Log.Logger(lot.LotName); //} //return Lots; return(ClassWork.FutureLots()); } catch (Exception ex) { Log.Logger(ex.Message); return(null); } }
public ActionResult Classwork(ClassWork model) { try { if (ModelState.IsValid) { db.ClassWorks.Add(model); Course course = db.Courses.Find(model.CourseId); List <Student> students = course.Students.ToList(); foreach (Student student in students) { db.Grades.Add(new Grade { ClassWorkId = model.ClassWorkId, FirstName = student.FirstName, LastName = student.LastName, Marks = "", Comment = "", CourseName = course.CourseName, ClassWorkName = model.ClassWorkName }); } db.SaveChanges(); return(RedirectToAction("Details", new { id = model.CourseId })); } } catch (RetryLimitExceededException /* dex */) { //Log the error (uncomment dex variable name and add a line here to write a log.) ModelState.AddModelError("", "Unable to save changes. Try again, and if the problem persists, see your system administrator."); } return(View(model)); }
/// <summary> /// accept button /// кнопка принять /// </summary> private void ButtonAccept_Click(object sender, RoutedEventArgs e) { if (_lastScriptGrid) { AcceptCreationScriptIndicator(); return; } string areaName = _gridViewAreas.SelectedCells[0].Value.ToString(); if (areaName == "NewArea") { for (int i = 0; i < 30; i++) { if (_chartMaster.AreaIsCreate("NewArea" + i) == false) { areaName = "NewArea" + i; break; } } } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Trades") { _chartMaster.CreateTickChart(); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "TickVolume") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "TickVolume" + i) == false) { name = "VWAP" + i; break; } } IndicatorCandle = new TickVolume(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "VWAP") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "VWAP" + i) == false) { name = "VWAP" + i; break; } } IndicatorCandle = new Vwap(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "UltimateOscillator") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "UltimateOscillator" + i) == false) { name = "UltimateOscillator" + i; break; } } IndicatorCandle = new UltimateOscillator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "KalmanFilter") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "KalmanFilter" + i) == false) { name = "KalmanFilter" + i; break; } } IndicatorCandle = new KalmanFilter(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Moving Average") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Sma" + i) == false) { name = "Sma" + i; break; } } IndicatorCandle = new MovingAverage(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Volume") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Volume" + i) == false) { name = "Volume" + i; break; } } IndicatorCandle = new Volume(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Price Channel") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Price Channel" + i) == false) { name = "Price Channel" + i; break; } } IndicatorCandle = new PriceChannel(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Bollinger") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Bollinger" + i) == false) { name = "Bollinger" + i; break; } } IndicatorCandle = new Bollinger(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "DonchianChannel") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "DonchianChannel" + i) == false) { name = "DonchianChannel" + i; break; } } IndicatorCandle = new DonchianChannel(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "BFMFI") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "BFMFI" + i) == false) { name = "BFMFI" + i; break; } } IndicatorCandle = new BfMfi(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "BullsPower") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "BullsPower" + i) == false) { name = "BullsPower" + i; break; } } IndicatorCandle = new BullsPower(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "CMO") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "CMO" + i) == false) { name = "CMO" + i; break; } } IndicatorCandle = new Cmo(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "BearsPower") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "BearsPower" + i) == false) { name = "BeasPower" + i; break; } } IndicatorCandle = new BearsPower(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Stochastic Oscillator") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "StochasticOscillator" + i) == false) { name = "StochasticOscillator" + i; break; } } IndicatorCandle = new StochasticOscillator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Stochastic Rsi") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "StochasticRsi" + i) == false) { name = "StochasticRsi" + i; break; } } IndicatorCandle = new StochRsi(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "RSI") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "RSI" + i) == false) { name = "RSI" + i; break; } } IndicatorCandle = new Rsi(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "ROC") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "ROC" + i) == false) { name = "ROC" + i; break; } } IndicatorCandle = new Roc(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "RVI") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "RVI" + i) == false) { name = "RVI" + i; break; } } IndicatorCandle = new Rvi(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Alligator") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Alligator" + i) == false) { name = "Alligator" + i; break; } } IndicatorCandle = new Alligator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "AO") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "AO" + i) == false) { name = "AO" + i; break; } } IndicatorCandle = new AwesomeOscillator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "AccumulationDistribution") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "AccumulationDistribution" + i) == false) { name = "AccumulationDistribution" + i; break; } } IndicatorCandle = new AccumulationDistribution(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Force Index") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Force Index" + i) == false) { name = "Force Index" + i; break; } } IndicatorCandle = new ForceIndex(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "OnBalanceVolume") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "OnBalanceVolume" + i) == false) { name = "OnBalanceVolume" + i; break; } } IndicatorCandle = new OnBalanceVolume(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Fractal") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Fractal" + i) == false) { name = "Fractal" + i; break; } } IndicatorCandle = new Fractal(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "ADX") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "ADX" + i) == false) { name = "ADX" + i; break; } } IndicatorCandle = new Adx(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "ATR") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "ATR" + i) == false) { name = "ATR" + i; break; } } IndicatorCandle = new Atr(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Price Oscillator") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Price Oscillator" + i) == false) { name = "Price Oscillator" + i; break; } } IndicatorCandle = new PriceOscillator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "MACD Histogram") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "MACD Histogram" + i) == false) { name = "MACD Histogram" + i; break; } } IndicatorCandle = new MacdHistogram(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "MACD Line") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "MACD Line" + i) == false) { name = "MACD Line" + i; break; } } IndicatorCandle = new MacdLine(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Momentum") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Momentum" + i) == false) { name = "Momentum" + i; break; } } IndicatorCandle = new Momentum(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "MoneyFlowIndex") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "MoneyFlowIndex" + i) == false) { name = "MoneyFlowIndex" + i; break; } } IndicatorCandle = new MoneyFlowIndex(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Envelops") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Envelops" + i) == false) { name = "Envelops" + i; break; } } IndicatorCandle = new Envelops(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Efficiency Ratio") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "EfficiencyRatio" + i) == false) { name = "EfficiencyRatio" + i; break; } } IndicatorCandle = new EfficiencyRatio(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Adaptive Look Back") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Adaptive Look Back" + i) == false) { name = "Adaptive Look Back" + i; break; } } IndicatorCandle = new AdaptiveLookBack(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "IvashovRange") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "IvashovRange" + i) == false) { name = "IvashovRange" + i; break; } } IndicatorCandle = new IvashovRange(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Volume Oscillator") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Volume Oscillator" + i) == false) { name = "Volume Oscillator" + i; break; } } IndicatorCandle = new VolumeOscillator(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Parabolic SAR") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Parabolic SAR" + i) == false) { name = "Parabolic SAR" + i; break; } } IndicatorCandle = new ParabolicSaR(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "CCI") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "CCI" + i) == false) { name = "CCI" + i; break; } } IndicatorCandle = new Cci(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Standard Deviation") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Standard Deviation" + i) == false) { name = "Standard Deviation" + i; break; } } IndicatorCandle = new StandardDeviation(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "AC") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "AC" + i) == false) { name = "AC" + i; break; } } IndicatorCandle = new Ac(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "VerticalHorizontalFilter") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "VerticalHorizontalFilter" + i) == false) { name = "VerticalHorizontalFilter" + i; break; } } IndicatorCandle = new VerticalHorizontalFilter(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "WilliamsRange") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "WilliamsRange" + i) == false) { name = "WilliamsRange" + i; break; } } IndicatorCandle = new WilliamsRange(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Trix") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Trix" + i) == false) { name = "Trix" + i; break; } } IndicatorCandle = new Trix(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Ichimoku") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Ichimoku" + i) == false) { name = "Ichimoku" + i; break; } } IndicatorCandle = new Ichimoku(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "TradeThread") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "TradeThread" + i) == false) { name = "TradeThread" + i; break; } } IndicatorCandle = new TradeThread(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Pivot") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "Pivot" + i) == false) { name = "Pivot" + i; break; } } IndicatorCandle = new Pivot(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } if (_gridViewIndicators.SelectedCells[0].Value.ToString() == "Pivot Points") { string name = ""; for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + "PivotPoints" + i) == false) { name = "PivotPoints" + i; break; } } IndicatorCandle = new PivotPoints(_chartMaster.Name + name, true); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } //+++ if (IndicatorCandle == null) { string ChartName = ""; string Indicator_name = _gridViewIndicators.SelectedCells[0].Value.ToString(); for (int i = 0; i < 30; i++) { if (_chartMaster.IndicatorIsCreate(_chartMaster.Name + Indicator_name + i) == false) { ChartName = _gridViewIndicators.SelectedCells[0].Value.ToString() + i; break; } } Object[] arg = { _chartMaster.Name + ChartName, true }; IndicatorCandle = (IIndicator)ClassWork.GetInstance(ClassWork.GetFullNameIndicator(Indicator_name), arg); _chartMaster.CreateIndicator(IndicatorCandle, areaName); } //--- Close(); if (IndicatorCandle != null) { IndicatorCandle.ShowDialog(); } }
public Lot AboutLot(int LotId) { return(ClassWork.AboutLot(LotId)); }
public int LastBet(int LotId) { return(ClassWork.LastBet(LotId)); }
public string TellMeAboutStartLot(int LotId) { return(ClassWork.TellMeAboutStartLot(person, LotId)); }
public void SendMessage(string Thema, string Message, Person to) { ClassWork.SendMessage(person, Thema, Message, to); }
public string LotHistory(int LotId) { return(ClassWork.LotHistory(LotId)); }
public List <Lot> AllLots() { return(ClassWork.AllLots()); }
public void ForgetPassword(string email, string Name) { ClassWork.ForgetPassword(email, Name); }
public void ForgetPassword(string email) { ClassWork.ForgetPassword(email); }