CrossTrade Docs
CrossTrade.io
  • Welcome!
    • Set Up Guide
  • Getting Started
    • Installation
    • User Dashboard
      • XT Control Panel
      • Command Tester
      • Command Builder
    • Alert History
    • TradingView Alerts
      • Dynamic Variables
      • XT Alert Builder
      • Example Indicators
      • Example Strategies
    • VPS Connection Guide
  • Webhooks
    • Overview
    • Commands
      • Place Order
      • Flat Place Order
      • Close Position
      • Reverse
      • Reverse Position
      • Flatten Positions
      • Flatten Everything
      • Cancel Order
      • Cancel Orders
      • Cancel All Orders
      • Cancel Replace
      • Change Order
      • Close Strategy
    • Advanced Options
      • Multi-Account Placement
      • Flatten First
      • Require Market Position
      • Max Positions
      • Bracket Orders
      • Percentage and Tick Prices
      • Limit Order Timeouts
      • Trading Window
      • Bypass Trade Windows
      • Delay Timer
      • Rate-Limiting
      • Alert Commenting
      • Kill Switch
      • Notes
    • Examples & Use Cases
    • Troubleshooting
  • Account Manager
    • Overview
      • How It Works
      • Dashboard
      • Global Settings
      • Frequently Asked Questions (FAQ)
    • Monitors
      • Profit/Loss Thresholds
      • Minimum Profit Drawdown
      • Trailing Drawdown
      • Advanced Usage
    • Account Settings
      • Auto-Flattening
      • Trading Windows
    • Management Logs
  • NinjaTrader
    • ATM Strategies
      • Creating ATM Template
    • Optimizing NinjaTrader Performance
    • Enabling Multi-Provider Mode
  • CrossTrade API
    • Overview
    • Authentication
    • Rate Limiting
    • Webhook Trading
    • Accounts
      • GET Accounts Summary
      • GET Accounts
      • GET Account
    • Positions
      • GET Positions
      • GET Position
      • POST Close Position
      • POST Reverse
      • POST Reverse Position
      • POST Flatten Positions
      • POST Flatten Everything
    • Orders
      • GET Orders
      • GET Order
      • GET Order Status
      • POST Cancel Order
      • POST Cancel Orders
      • POST Cancel All Orders
      • POST Place Order
      • POST Flat Place Order
      • POST Replace Order
      • PUT Change Order
    • Strategies
      • GET Strategies
      • GET Strategy
      • POST Close Strategy
    • Executions
      • GET Executions
      • GET Execution
    • Quotes
      • GET Quote
  • Changelog
    • XT Versions
    • All Updates
  • Affiliate Program
    • Media Kit
  • Social Links
    • Discord
    • TradingView
    • YouTube
    • X (Twitter)
    • Instagram
    • Facebook
    • Reddit
    • Website
    • Blog
Powered by GitBook
On this page
  • Key Functionality
  • Technical Details
  • Important Notes
  • Operational Requirements
  1. Account Manager
  2. Account Settings

Auto-Flattening

The NinjaTrader Account Manager (NAM) module provides an automated End-of-Day (EOD) flattening feature, configurable on a per-monitor basis. This feature programmatically closes all open positions in a specified trading account at a designated time.

Key Functionality

  • User-Configured Flatten Time: The EOD flatten time is set via a 24-hour format string (HH:mm). Time is always interpreted in the US/Eastern time zone.

  • Non-Mandatory Feature: EOD flattening is optional. Users can disable this function for individual monitors as needed, with the option to manually disable auto-flatten through a toggle switch. If auto-flattening is disabled for an account, it will require a time to be set again, if and when the user would like to start employing the flatten function again.

  • Explicit Configuration: EOD flattening requires explicit time configuration by the user; there is no automatic configuration applied to an account during creation.

  • Server-Side Execution: The flattening process is executed by a server-side component. The back-end server executes the flattening logic and generates the appropriate flatten orders. This enables flattening even if and only if the client application (NT8 add-on) is running.

  • STOPPED Status Precedence: The EOD flattening operation is subservient to the monitor's STOPPED status. If an account’s monitor has entered a STOPPED state (typically due to a threshold breach) time-based EOD flattening is blocked. Only when a STOPPED monitor has been manually restarted can the time based EOD flattening process re-engage.

  • Enabled Monitor Dependency: EOD flattening only executes for enabled monitors, as defined in the UI's enable/disable toggle for a specific account monitor.

  • Weekday Operational Scope: The EOD auto-flatten feature executes exclusively on weekdays (Monday-Friday). Weekend functionality is not supported, and is not a replacement for personal oversight of open position in your NT8 accounts.

  • CrossTrade Dependency: The EOD flatten function will not execute if the client is not running. The CrossTrade application (the platform itself) must be running on some level to have an auto-flatten engage as expected. Also, for all other intraday monitor and control parameters in NAM to operate properly during live trading, the accounts must be flat each day prior to engagement with the service.

Technical Details

EOD flattening triggers with "best effort" execution. That means CrossTrade will attempt to flatten positions at the time specified. If the account cannot be flattened—because the the CrossTrade client is disconnected—the servers will try again at the top of every 1-minute for up to 5 minutes.

If at the end of 5 minutes the account still cannot be flattened, the servers will stop trying.

Important Notes

  • Time Zone: All time inputs are explicitly handled as US/Eastern time zone. Time inputs for EOD flattening cannot be configured in any other time zone.

  • Trigger Execution: The execution trigger for EOD flattening occurs at the designated time via a scheduled server-side event. The client connection to the server is required at that moment in time for the feature to be executed.

  • Order Type: Flattening uses market orders or matched inverse market orders using NT8’s internal order logic.

Operational Requirements

  • Active user monitor configurations are required for EOD flattening actions to occur for any individual user accounts.

  • EOD flattening is not dependent on a flat session start like continuous monitoring. As long as the monitor is enabled and CrossTrade is connected, EOD flattening will trigger at the specified time.

PreviousAccount SettingsNextTrading Windows

Last updated 2 months ago