Strategies
Rules for entering and exiting the market, evaluated as a syntax tree.
Strategies
A strategy is a rule that tells NexusTrade when and how to execute a trade. Each strategy has two parts:
- Conditions: A boolean expression that evaluates to true or false (the "when").
- Action: What to do when the conditions are met (the "what").
When a strategy's conditions evaluate to true, its action is executed. When they evaluate to false, nothing happens.
Strategy Actions
Each strategy has exactly one action type:
| Action |
Description |
| Buy |
Purchase a specified amount of an asset |
| Sell |
Sell a specified amount of an asset you hold |
| Alert |
Send a notification without executing any trade |
| Rebalance |
Adjust portfolio holdings to match target allocation weights |
| Launch Agent |
Launch an AI agent to analyze and act on your portfolio |
| OpenOption |
Open a new options position (single-leg or multi-leg spread); contracts resolve when the strategy runs |
| CloseOption |
Close existing option positions using P/L, DTE, underlying, spread type, and other filters |
How Strategies Are Evaluated
Strategies are evaluated as a syntax tree. This is the key concept that makes NexusTrade so powerful:
Strategy
├── Action: Buy $1,000 of AAPL
└── Condition Tree
└── AND
├── RSI(AAPL, 14) < 30
└── SMA(AAPL, 50) > SMA(AAPL, 200)
In this example, the Buy action only executes when both conditions are true simultaneously: the RSI is below 30 AND the 50-day SMA is above the 200-day SMA.
Multiple Strategies per Portfolio
A portfolio can contain multiple strategies that work together. For example:
- Strategy 1 (Buy): Buy AAPL when RSI < 30
- Strategy 2 (Sell): Sell AAPL when RSI > 70
- Strategy 3 (Rebalance): Rebalance quarterly to 50% SPY, 30% QQQ, 20% IWM
- Strategy 4 (Launch Agent): Launch an AI agent to review portfolio performance every quarter
Each strategy is evaluated independently on every tick of market data.
Allocation Types
When configuring a Buy or Sell action, you specify how much to trade:
| Allocation Type |
Example |
Description |
| Dollar amount |
$500 |
Trade a fixed dollar value |
| Percentage of portfolio |
10% |
Trade a percentage of total portfolio value |
| Number of shares |
25 shares |
Trade an exact number of shares |
| Percentage of position |
100% of position |
Sell a percentage of your current holdings |