Forex_Strategy_Builder.Position.Copy C# (CSharp) Метод

Copy() публичный Метод

Deep copy of the position
public Copy ( ) : Position
Результат Position
        public Position Copy()
        {
            Position position = new Position();

            position.transaction       = this.transaction;
            position.posDirection      = this.posDirection;
            position.openingBar        = this.openingBar;
            position.ordNumb           = this.ordNumb;
            position.ordPrice          = this.ordPrice;
            position.posNumb           = this.posNumb;
            position.posLots           = this.posLots;
            position.posPrice          = this.posPrice;
            position.absoluteSL        = this.absoluteSL;
            position.absoluteTP        = this.absoluteTP;
            position.breakEven         = this.breakEven;
            position.requiredMargin    = this.requiredMargin;
            position.profitLoss        = this.profitLoss;
            position.floatingPL        = this.floatingPL;
            position.balance           = this.balance;
            position.equity            = this.equity;
            position.chargedSpread     = this.chargedSpread;
            position.chargedRollover   = this.chargedRollover;
            position.chargedCommission = this.chargedCommission;
            position.chargedSlippage   = this.chargedSlippage;
            position.moneyProfitLoss   = this.moneyProfitLoss;
            position.moneyFloatingPL   = this.moneyFloatingPL;
            position.moneyBalance      = this.moneyBalance;
            position.moneyEquity       = this.moneyEquity;
            position.moneySpread       = this.moneySpread;
            position.moneyRollover     = this.moneyRollover;
            position.moneyCommission   = this.moneyCommission;
            position.moneySlippage     = this.moneySlippage;

            return position;
        }