> 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.

# Monitoring Stop-Loss and Profit Target Orders

At times you may have a need to monitor the stop-loss and profit target orders generated by the **SetStopLoss()**, **SetTrailStop()** or **SetProfitTarget()** methods. You can accomplish this by capturing their unique Order object as the **OnOrderUpdate()** method is called and process them into a collection for future referencing.

## Key concepts in this example

* Monitoring stop-loss order states
* Monitoring profit target order states

## Important related documentation

* [Order](/developer/desktop-sdk/references/strategy/order)
* [OrderState](/developer/desktop-sdk/references/strategy/order)
* [OnOrderUpdate()](/developer/desktop-sdk/references/strategy/onorderupdate)
* [System.Collections (for List\<>)](https://learn.microsoft.com/en-us/dotnet/api/system.collections?view=netframework-4.8)

## 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

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