NinjaScript > Educational Resources > Reference Samples > Strategy >

Scaling out of a position

Print this Topic Previous pageReturn to chapter overviewNext page

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
SetProfitTarget()
SetTrailStop()
EntriesPerDirection*
EntryHandling*
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 File > Utilities > Import NinjaScript
3.Select the downloaded file and click Import.

 

SampleScaleOut_NT7.zip