> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Scaling out of a position

A common technique used by discretionary traders is scaling in and scaling out of a position. To scale out of a position refers to closing a portion of your position when you hit a profit target and then raising your stop to close your remaining portion later.

## Key concepts in this example

* Submitting Profit Target orders
* Submitting Trailing Stop orders
* Closing half of your position at a time

## Important related documentation

* [MarketPosition](/developer/desktop-sdk/references/strategy/positionaccount/marketposition)
* [SetProfitTarget()](/developer/unsorted/setprofittarget)
* [SetTrailStop()](/developer/desktop-sdk/references/strategy/order-methods/managed-approach/settrailstop)
* [EntriesPerDirection\*](/developer/desktop-sdk/references/strategy/entriesperdirection)
* [EntryHandling\*](/developer/desktop-sdk/references/strategy/entryhandling)
* [SetStopLoss()](/developer/desktop-sdk/references/strategy/order-methods/managed-approach/setstoploss)

*\* Entry handling properties can be either programmatically set or set through the Strategy dialog window*

## Import instructions

1. Download the file contained in this Help Guide topic to your PC desktop
2. From the Control Center window, select the menu Tools > Import > NinjaScript
3. Select the downloaded file

[SampleScaleOut\_NT8.zip](https://ninjatrader.com/support/helpGuides/nt8/samples/SampleScaleOut_NT8.zip)