Strategies
Strategies group related trades for performance tracking and analysis. They help you measure how different trading approaches perform over time.
Why Use Strategies?
- Performance Tracking - Measure win rate, profit factor, and returns per strategy
- Organisation - Group trades by methodology (momentum, mean reversion, etc.)
- Comparison - Compare performance across different approaches
- Automation - Link signals to strategies for systematic tracking
Strategy Types
UTM supports the following strategy type categories:
| Type | Code | Description |
|---|---|---|
| Market on Close | moc | Execute at or near the market close |
| Mean Reversion | mr | Trade reversals back to an average price |
| Trend Following | tf | Follow market trends and buy breakouts |
| Rotation | rot | Rotate capital between sectors or assets |
| High Frequency | hft | Rapid, short-term trades |
| Custom | custom | User-defined methodology |
Creating a Strategy
Step 1: Navigate to Strategies
Go to Strategies in the main menu.
Step 2: Create New Strategy
Click New Strategy and fill in:
| Field | Description |
|---|---|
| Name | Descriptive name (e.g., "MACD Crossover"). Required, max 100 chars. |
| Type | Strategy category (see types above). Required. |
| Description | Optional notes about the methodology. Max 500 chars. |
| Active | When off, new signals targeting this strategy are rejected (existing trades and their auto-close keep running). Defaults to on. |
| Quantity Modifier | Scale signal quantities for this strategy (0.01 to 10, default 1.0). |
| Auto Submit Close Order | Automatically submit a close order near market close (MOC strategies). |
| Auto Close Minutes Before | How many minutes before market close to submit the close order. |
Step 3: Configure Risk Parameters
Risk validation runs before every order leaves UTM for the broker. Refused orders never reach the broker, and the originating signal is marked cancelled with the reason on it.
When riskParameters is not set on the strategy, UTM applies sensible defaults:
| Default | Value |
|---|---|
| riskEnabled | true |
| maxPositionPctEquity | 10% of equity |
| maxOpenPositions | 20 open positions |
To opt out entirely on a specific strategy, set riskEnabled to false in its riskParameters. Closing-intent orders always pass the gate regardless of configuration, so you can always close a position.
All other fields are optional and merge over the defaults. A UI to manage these per strategy is not yet exposed; until then, configuration is via direct API call to updateStrategyRiskParameters or a database update.
| Parameter | Description |
|---|---|
| riskEnabled | Master toggle. Set to false to skip every check for this strategy. Defaults to true. |
| maxPositionSize | Maximum number of shares or contracts per position. |
| maxPositionValue | Maximum dollar value of a single position. |
| maxPositionPctEquity | Maximum position size as a percentage of account equity (0-100). Defaults to 10 when unset. |
| maxTotalExposure | Maximum total dollar exposure across all positions. |
| maxTotalExposurePct | Maximum total exposure as a percentage of equity (0-100). |
| maxOpenPositions | Maximum number of open positions at any time. Defaults to 20 when unset. |
| maxPositionPerSymbol | Maximum aggregate share count per symbol across all strategies. |
| maxDailyTrades | Reserved. Interface-only, no check fires yet. |
| maxDailyLoss | Maximum dollar loss allowed in a single day. Measured from realised P&L on trades closed today (UTC). |
| maxDailyLossPct | Maximum daily loss as a percentage of equity (0-100). |
| maxTrailLoss | Reserved. Interface-only, no check fires yet. |
Linking Trades to Strategies
Via Signals
Include strategy ID when creating signals:
{
"symbol": "AAPL",
"action": "openLong",
"quantity": 100,
"strategyId": "your-strategy-uuid"
}
All resulting trades link to this strategy.
Via Manual Orders
When placing orders manually:
- Open order entry dialog
- Select strategy from dropdown (optional)
- Submit order
- Resulting trade links to strategy
Retroactive Assignment
Assign existing trades to a strategy:
- Open trade details
- Click Edit
- Select strategy
- Save changes
Strategy Performance
Metrics Tracked
| Metric | Description |
|---|---|
| Total Trades | Number of completed trades |
| Win Rate | Percentage of profitable trades |
| Average Win | Average profit on winning trades |
| Average Loss | Average loss on losing trades |
| Profit Factor | Gross profit ÷ gross loss |
| Net P&L | Total profit/loss |
| Return % | Percentage return on capital |
| Max Drawdown | Largest peak-to-trough decline |
Performance Views
Navigate to a strategy's detail page to see:
- Summary: Key metrics at a glance
- Equity Curve: Performance over time
- Trade List: All trades in this strategy
- Statistics: Detailed breakdown
Filtering by Date
Analyse performance over specific periods:
- Last 7 days
- Last 30 days
- This month
- This year
- Custom range
Strategy Comparison
Side-by-Side View
Compare multiple strategies:
- Go to Strategies
- Select strategies to compare (checkboxes)
- Click Compare
- View metrics side by side
Key Comparisons
| Compare | Purpose |
|---|---|
| Win Rate | Consistency of profits |
| Profit Factor | Risk-adjusted returns |
| Max Drawdown | Worst-case scenarios |
| Return % | Overall effectiveness |
Best Practices
Naming Conventions
Use clear, descriptive names:
- ✓ "MACD Daily Crossover - Tech Stocks"
- ✓ "RSI Oversold Bounces"
- ✗ "Strategy 1"
- ✗ "Test"
One Strategy Per Methodology
Don't mix different approaches in one strategy:
- ✓ Separate "Momentum Long" and "Mean Reversion Short"
- ✗ Combining all trades in "My Trades"
Paper Test First
Before using a strategy with real money:
- Create the strategy
- Link to a paper account
- Run signals and track performance
- Analyse results
- Move to live when confident
Cross-Strategy Symbol Conflicts on Netting Brokers
Some brokers (Alpaca, TradeStation) only hold one net position per symbol per account. If two of your strategies trade the same symbol on the same account, one long and one short, the broker collapses both sides into a single net and the next close signal fails with "insufficient quantity available".
UTM blocks this state up-front. If a strategy tries to open the opposing side of an already-open trade on the same (account, symbol), the new signal is rejected with OPPOSING_POSITION_OPEN and the conflicting trade id, even when the two trades belong to different strategies. Close the opposing trade to flat before opening the new one.
Brokers with hedging-mode support (e.g. Interactive Brokers in the right account configuration) can hold both sides simultaneously and are not affected by this guard.
Practical implications:
- Two strategies on the same Alpaca or TradeStation account must not run opposing-direction systems on the same symbol universe.
- Same-side stacking is allowed: two strategies opening long on the same symbol both succeed and contribute to a single broker position.
- To run opposing-direction systems on overlapping symbols, point each strategy at a separate broker account.
Automation Integration
TradingView Alerts
Send alerts to UTM with strategy assignment:
{
"symbol": "{{ticker}}",
"action": "openLong",
"accountId": "your-account-uuid",
"quantity": 100,
"strategyId": "your-strategy-uuid"
}
Exit Rules
Strategy signals can include an automatic exit on the signal payload itself:
{
"strategyId": "day-trading-strategy",
"exitTriggerType": "minutesAfterEntry",
"exitTriggerMinutes": 30,
"exitOrderType": "market"
}
Exit fields:
exitTriggerType: scheduling rule for the exit. One ofminutesAfterEntry,minutesBeforeClose,atClockTime, orimmediate.exitTriggerMinutes: minutes count (0 to 60). Required forminutesAfterEntryandminutesBeforeClose.exitTriggerTime:HH:MM(24-hour) submit time. Required foratClockTime.exitOrderType:market,limit,stop,stopLimit, ormoc.exitLimitPrice: limit price (required forlimitandstopLimit).exitTimeInForce:dayorcls. Must beclswhenexitOrderTypeismoc.
See Exit Rules Reference for the full field reference.
Common Issues
Trades Not Linking
Check:
- Strategy ID is correct (UUID format)
- Strategy is active
- Signal includes
strategyIdfield
Performance Not Updating
Verify:
- Trades are closed (open trades don't count in some metrics)
- Date range includes the trades
- Refresh the page
Missing Metrics
Some metrics require minimum data:
- Win rate needs at least 1 closed trade
- Profit factor needs both wins and losses
- Drawdown needs equity history
Deleting Strategies
Deleting a strategy does not delete associated trades. Trades will become unlinked and can be reassigned.
To delete:
- Open strategy details
- Click Delete
- Confirm deletion
- Trades remain but lose strategy association