CrossTrade Docs
Basic CommandsAdvanced Commands
  • Welcome!
    • Set Up Guide
  • Getting Started
    • Installation
    • User Dashboard
      • XT Control Panel
      • Manual Trader
      • 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
  • Alert-Level Trading Windows
  • Time Formats
  • Example Payload
  1. Webhooks
  2. Advanced Options

Trading Window

Alert-Level Trading Windows

By request, we've added the ability to set trading windows at the alert level in addition to your Master Trading Windows on the XT Control Panel. The fields start_time and end_time can be used to dictate the valid window of time signals are allowed to pass through to NT8.

Just like the Control Panel, all time values are in US/Eastern market time, or NYC time. You can set either a start_time or an end_time or both. If only a start time exists, if the current time exceeds the start time, the alert is accepted. Similarly, if the current time is less than the end time, the alert is accepted. If both times are set, the current time must be between both times.

Both the alert-level trading window and the XT Control Panel trading window can be used at the same time and will both be evaluated if set.

Closing Only

In addition to start_time and end_time there's also the option closing_only_after available at the alert level, which behaves identically to the XT Control Panel closing only filter.

closing_only_after will allow only closing/exit orders to pass through after the specified time. To use it, both a start_time and end_time must be set. Typically, the closing_only_after time will be between the start_time and end_time.

Sending a PLACE order with the flatten_first flag enabled will process the CLOSEPOSITION action but block the subsequent PLACE command.

Time Formats

Valid formats for times are any of the following in 12- or 24-hour clock format.

Representing 1:30 AM ET:

  • 01:30

  • 01:30 AM

  • 01:30AM

  • 1:30

  • 1:30 AM

  • 1:30AM

Representing 1:30 PM ET:

  • 13:30

  • 01:30 PM

  • 01:30PM

  • 1:30 PM

  • 1:30PM

Example Payload

The following alert will only be processed if the current market time (US/Eastern, NYC time) is between the start_time and end_time.

key=your-secret-key; command=PLACE; account=sim101; instrument=ES 06-25; action=BUY; qty=1; order_type=MARKET; TIF=DAY; start_time=9:30 AM; end_time=4:00 PM;

If you only want CrossTrade to accept closing orders after 3:00 PM, your message might look like this:

key=your-secret-key; command=PLACE; account=sim101; instrument=ES 06-25; action=BUY; qty=1; order_type=MARKET; TIF=DAY; start_time=9:30 AM; end_time=4:00 PM; closing_only_after=3:30 PM;

PreviousLimit Order TimeoutsNextBypass Trade Windows

Last updated 1 month ago