public static OHLCV operator +(OHLCV lhs, Decimal rhs) { OHLCV retVal = new OHLCV(lhs.DateTime); retVal.Close = lhs.Close + rhs; retVal.High = lhs.High + rhs; retVal.Low = lhs.Low + rhs; retVal.Open = lhs.Open + rhs; return(retVal); }
public void Update(OHLCV Data) { if (Data.FirstDateTime < this.FirstDateTime) { this.FirstDateTime = Data.FirstDateTime; this.Open = Data.Open; } if (Data.High > this.High) { this.High = Data.High; } if (Data.Low < this.Low) { this.Low = Data.Low; } if (Data.LastDateTime > this.LastDateTime) { this.LastDateTime = Data.LastDateTime; this.Close = Data.Close; } }
public static double SquareError(OHLCV Prediction, OHLCV Actual) { return(Math.Pow((double)Prediction.Close - (double)Actual.Close, 2)); }
public Bar(OHLCV Price, int BarNumber) { _ohlcv = Price; this.Number = BarNumber; }
public static Decimal SquareError(OHLCV Prediction, OHLCV Actual) { return((Decimal)Math.Pow((double)(Prediction.Close - Actual.Close), 2)); }