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

# IsWaitUntilFlat

## Definition

Indicates the strategy is currently waiting until a flat position is detected before submitting live orders.

This property would only apply if the strategy **StartBehavior** was set to **StartBehavior.WaitUntilFlat** or **StartBehavior.WaitUntilFlatSynchronizeAccount**.

## Property Value

This property returns true if the strategy has detected it is either in a long or short position during **State.Transition**; otherwise false. Default value is set to false.

## Syntax

`IsWaitUntilFlat`

## Examples

```csharp
// If a strategy is waiting for a flat position, return and print a message
if (!IsWaitUntilFlat)
{ 
   Print("This strategy is currently waiting for a flat account position to begin placing trades");
   return;
}
```