/// <summary> /// Constructor /// </summary> public WayPoint(double price, WayPointType wpType, int ordNumb, int posNumb) { Price = price; WpType = wpType; if (wpType == WayPointType.Open || wpType == WayPointType.High || wpType == WayPointType.Low || wpType == WayPointType.Close || wpType == WayPointType.None) { OrdNumb = -1; } else { OrdNumb = ordNumb; } if (Backtester.PosFromNumb(posNumb).PosDir == PosDirection.None || Backtester.PosFromNumb(posNumb).PosDir == PosDirection.Closed && wpType != WayPointType.Exit && wpType != WayPointType.Reduce) { PosNumb = -1; } else { PosNumb = posNumb; } }