ReferencesAdd OnAccount ClassFlatten()Ask a question|Copy page|View as Markdown|More actionsDefinition Flattens the account on an instrument. Syntax Flatten(ICollection\<instrument\> instruments) Parameters ParameterDescriptioninstrumentsA collection of Instruments for orders to be cancelled and positions closed Examples Flatten a single instrument 1Account.Flatten(new [] { Instrument.GetInstrument("ES 12-15") }); Flatten a list of instruments 1// Please note that your 'Using declarations' section needs to have2//3// using System.Collections.ObjectModel;4//5//added in order for this example to compile correctly67// instantiate a list of instruments8Collection<cbi.instrument> instrumentsToClose = new Collection<instrument>();910// add instruments to the collection11instrumentsToClose.Add(Instrument.GetInstrument("AAPL"));12instrumentsToClose.Add(Instrument.GetInstrument("MSFT"));1314// pass the instrument collection to the Flatten() method to be flattened15Account.Flatten(instrumentsToClose);