FastQuant.Statistics.Drawdown.OnPositionChanged C# (CSharp) Method

OnPositionChanged() protected method

protected OnPositionChanged ( Position position ) : void
position Position
return void
        protected internal override void OnPositionChanged(Position position)
        {
            var fill = position.Fills[position.Fills.Count - 1];
            if (position.Side == PositionSide.Long)
                this.longAccValue += fill.CashFlow;
            else if (position.Side == PositionSide.Short)
                this.shortAccValue -= fill.CashFlow;
        }