Writing Strategies

Your strategy prompt can be as simple or complex as you want. Use plain English with dashes to define conditions — Vertex Street interprets the logic and builds the backtest for you.

Basic structure

A strategy is a set of rules describing when to buy and when to sell. Use dashes to list conditions:

From 2020-01-01 to 2025-01-01 (daily):
- Buy AAPL when RSI(14) < 30 and price is above the 200-day SMA
- Sell when RSI(14) > 70 or price drops 5% from entry

Multiple conditions

Stack as many conditions as you need. All conditions on a single buy/sell line must be true simultaneously:

From 2019-01-01 to 2025-01-01 (daily):
- Buy SPY when:
  - RSI(14) < 30
  - Price is above the 200-day SMA
  - MACD histogram is positive
  - Volume is 1.5x above the 50-day average
- Sell all when RSI(14) > 70

Multi-asset strategies

You can trade multiple assets with different rules:

From 2018-01-01 to 2025-01-01 (daily):
- Buy AAPL when P/E ratio < 20 and revenue growth > 10%
- Buy MSFT when price crosses above the 50-day SMA
- Sell AAPL when P/E ratio > 35
- Sell MSFT when price crosses below the 50-day SMA

Doubling down on existing positions

Use "double down" or "add to position" to increase your stake without re-triggering the initial buy condition. This only fires if you already hold the asset:

From 2021-01-01 to 2025-01-01 (daily):
- Buy SPY when RSI(14) < 30 and price > 200-day SMA
- Double down on SPY if price drops another 5% from my last buy
- Sell all SPY when RSI(14) > 70

The double down rule is independent — it won't open a new position, it only adds to one you already hold. You can chain multiple levels:

From 2022-01-01 to 2025-06-01 (daily):
- Buy QQQ when price drops 10% from 52-week high
- Double down if price drops another 5% from last entry
- Double down again if price drops another 5% from last entry
- Sell all when price recovers to the 50-day SMA

Position sizing

Specify how much to invest per trade:

From 2020-06-01 to 2025-01-01 (daily):
- Buy $2,000 of NVDA when earnings growth > 25% and P/E < 40
- Buy 50% of available cash in TSLA when RSI < 25
- Sell half my NVDA when it's up 30% from entry
- Sell all TSLA when price breaks below 200-day SMA

Time-based conditions

Mix time and technical conditions:

From 2020-01-01 to 2025-01-01 (daily):
- Buy VTI on the first trading day of each month
- Sell all if the S&P 500 drops more than 3% in a single week
- Re-buy after 5 trading days if price is above the 20-day SMA

Combining fundamentals and technicals

From 2019-01-01 to 2025-01-01 (daily):
- Buy AMZN when:
  - Revenue growth > 15%
  - Free cash flow is positive
  - RSI(14) < 40
  - Price is within 10% of 52-week low
- Sell when P/E > 60 or price drops 15% from peak
← WelcomeNext: Orders & Indicators →