public void TestAddNegativeMinutes() { timestamp = new TimeStamp(); timestamp.AddMinutes(-12); Assert.Equal(0, timestamp.Seconds); Assert.Equal(0, timestamp.Minutes); Assert.Equal(0, timestamp.Hours); }
/// <summary> /// Ovverride For 5 Min Interval /// </summary> /// <returns></returns> public override string ToString() { string r = Reason.ToString(); if (this.Reason == 0) { r = ""; } string msg = "Trade Details: " + r + " \n" + TimeStamp.AddMinutes(4) + " " + BuyorSell + " " + TradeVolume + " @" + TradedPrice + "\n"; return(msg); }
public void TestAddMinutes() { timestamp = new TimeStamp(); timestamp.AddMinutes(1); Assert.Equal(0, timestamp.Seconds); Assert.Equal(1, timestamp.Minutes); Assert.Equal(0, timestamp.Hours); timestamp.AddMinutes(59); Assert.Equal(0, timestamp.Seconds); Assert.Equal(0, timestamp.Minutes); Assert.Equal(1, timestamp.Hours); timestamp.AddMinutes(60 * 22 + 15); Assert.Equal(0, timestamp.Seconds); Assert.Equal(15, timestamp.Minutes); Assert.Equal(23, timestamp.Hours); timestamp.AddMinutes(60); Assert.Equal(0, timestamp.Seconds); Assert.Equal(15, timestamp.Minutes); Assert.Equal(0, timestamp.Hours); }
private void CalcStrength() { if (this[0] > Extreme) { strength = Strength.Ex; } else if (this[0] > Average) { strength = Strength.Hi; } else if (this[0] > DryUp) { strength = Strength.Lo; } else { strength = Strength.DU; dryUpTimer = Ticks[0].Time; dryUpTimer.AddMinutes(5); } }