public override int GetHashCode() { unchecked { var hashCode = ChargeIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ CutoffDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ CutoffDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ ExpireAfterSpecificNumberOfCharges.GetHashCode(); hashCode = (hashCode * 397) ^ (FulfillmentService != null ? FulfillmentService.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Grams.GetHashCode(); hashCode = (hashCode * 397) ^ (LinePrice != null ? LinePrice.GetHashCode() : 0); hashCode = (hashCode * 397) ^ OrderDayOfMonth.GetHashCode(); hashCode = (hashCode * 397) ^ OrderDayOfWeek.GetHashCode(); hashCode = (hashCode * 397) ^ OrderIntervalFrequency.GetHashCode(); hashCode = (hashCode * 397) ^ (OrderIntervalUnit != null ? OrderIntervalUnit.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Price != null ? Price.GetHashCode() : 0); hashCode = (hashCode * 397) ^ ProductId.GetHashCode(); hashCode = (hashCode * 397) ^ Quantity.GetHashCode(); hashCode = (hashCode * 397) ^ RequiresShipping.GetHashCode(); hashCode = (hashCode * 397) ^ (Sku != null ? Sku.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Taxable.GetHashCode(); hashCode = (hashCode * 397) ^ (Title != null ? Title.GetHashCode() : 0); hashCode = (hashCode * 397) ^ VariantId.GetHashCode(); hashCode = (hashCode * 397) ^ (VariantTitle != null ? VariantTitle.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Vendor != null ? Vendor.GetHashCode() : 0); return(hashCode); } }
protected override void OnCalculate() { double RSI_value = RSI(this.RSIPeriod, 1)[0]; this._RSI_List.Set(RSI_value); double PRICE_value = SMA(this._RSI_List, this.PricePeriod)[0]; LinePrice.Set(PRICE_value); double SIGNAL_value = SMA(this._RSI_List, this.SignalPeriod)[0]; SignalLine.Set(SIGNAL_value); double AVG_value = SMA(this._RSI_List, this.BandPeriod)[0]; Average.Set(AVG_value); MidLine.Set(50); double stdDevValue = StdDev(this._RSI_List, this.BandPeriod)[0]; Upper.Set(AVG_value + this.StdDevNumber * stdDevValue); Lower.Set(AVG_value - this.StdDevNumber * stdDevValue); PlotColors[0][0] = this.Main; PlotColors[1][0] = this.Signal; PlotColors[2][0] = this.BBAverage; PlotColors[3][0] = this.BBUpper; PlotColors[4][0] = this.BBLower; if (AVG_value > 50) { PlotColors[5][0] = this.MidPositive; } else { PlotColors[5][0] = this.MidNegative; } OutputDescriptors[0].PenStyle = this.Dash0Style; OutputDescriptors[0].Pen.Width = this.Plot0Width; OutputDescriptors[1].PenStyle = this.Dash1Style; OutputDescriptors[1].Pen.Width = this.Plot1Width; OutputDescriptors[2].PenStyle = this.Dash2Style; OutputDescriptors[2].Pen.Width = this.Plot2Width; OutputDescriptors[3].PenStyle = this.Dash3Style; OutputDescriptors[3].Pen.Width = this.Plot3Width; OutputDescriptors[4].PenStyle = this.Dash3Style; OutputDescriptors[4].Pen.Width = this.Plot3Width; OutputDescriptors[5].PenStyle = this.Dash3Style; OutputDescriptors[5].Pen.Width = this.Plot3Width; }
private void metroButton1_Click_1(object sender, EventArgs e) { //variables; string ItemName; int ItemQuantity; decimal LinePrice; SqlConnection sqlcon = new SqlConnection(Globals_Class.ConnectionString); sqlcon.Open(); string cmd = "Select ItemName, ItemQuantity, LinePrice FROM Sales"; SqlCommand sqlcom = new SqlCommand(cmd, sqlcon); SqlDataReader reader; reader = sqlcom.ExecuteReader(); if (reader.HasRows) { while (reader.Read()) { ItemName = (reader["ItemName"].ToString()); ItemQuantity = Convert.ToInt32((reader["ItemQuantity"])); LinePrice = Convert.ToDecimal((reader["LinePrice"])); Details += "\n" + "Item Name:" + " " + ItemName + "\n" + "Quantity Sold:" + " " + ItemQuantity.ToString() + "\n" + "Sale Price:" + " " + LinePrice.ToString() + "\n"; } } reader.Close(); sqlcon.Close(); documentWriter(); }