Strategies
Starter strategies
Ready strategies to run as they are or change, grouped by what you want to do. Each is short Flowscript with its settings as knobs, and each backtests in one click.
Every starter is in the Strategies page's list (and in list_strategies over the API). Open one to read its code, change its settings, backtest it and run it. They are starting points: paper sizes and default settings, not advice.
Follow a trend#
| Starter | What it does |
|---|---|
| EMA crossover | Buys when the fast average crosses above the slow one; sells when it crosses back. |
| Breakout | Buys a close above the highest high of the lookback; sells a close below the lowest low of the exit window. |
| Momentum | Buys when the price has risen at least the entry move over the lookback and is above its trend; sells when the move turns down or the price falls under the trend. |
| Perp trend, long and short | On a perp: long while the fast average is above the slow one, short while it's below. |
| ML forecast | A ridge regression trained on the market as it runs, on five features (recent moves, distance from two EMAs, RSI). Buys when the forecast clears the entry move, sells when it turns negative. Swap in lasso, SVM, logistic or k-NN in the code. |
Buy dips, sell rips#
| Starter | What it does |
|---|---|
| RSI reversion | Buys when RSI falls below the low line; sells when it rises above the high line. |
| Bollinger dip | Buys a close below the lower band; sells at the middle band. |
| VWAP rotation | On BTC perps, 1m or 5m bars: fades failed pushes into the day's 2σ VWAP band back to the VWAP, skipping trending days, the first hour, Saturdays and moves too small to pay fees. |
Earn from funding, books and spreads#
| Starter | What it does |
|---|---|
| Funding fade | On a perp: short when longs pay high funding, long when shorts do, close once funding is back near zero. |
| Order book imbalance | Long when bids within 0.5% of the price outweigh asks by a ratio, short on the mirror, flat once the book evens out. |
| Microprice lean | On 1m bars: trades the microprice's lean toward the ask or the bid while the spread is tight and the book fresh. |
| Maker quotes | Rests a bid and an ask at the touch each bar, stepped back by an edge, to earn the spread and pay maker fees. On a live project they rest on the venue as post-only orders. |
| Depth-capped breakout | On 15s bars: breaks out with the book behind it, each entry capped to what rests within a few bps of the middle. |
| Polymarket book pressure | On a Polymarket outcome: buys when dollars bid outweigh dollars offered on the top levels, while the spread is tight. |
Order book strategies are covered in Order book strategies.
Options and liquidity#
| Starter | What it does |
|---|---|
| Options volatility, hedged on the perp book | Sells a Derive strangle when implied volatility is rich against what ETH realizes, buys a straddle when it's cheap, and hedges the delta on Hyperliquid every bar. |
| Hedged range, width by session and volatility | Holds liquidity on a dollar pool (NVDA/USDG on Robinhood Chain), wider off the stock session and when it moves more, shorted on a perp. |
| Hedged LP: volatility range, perp short | Liquidity on ETH/USDG sized to how much ETH has moved, hedged with an ETH short on Lighter that follows what the range holds. |
| Overnight hold | On a stock token (SPY/USDG): buys in the last minutes of the NYSE session and sells on the next open, holding only overnight. Keeps the exchange's holidays and half days. |
Launches#
These run well as stages of a workflow around a token launch.
| Starter | What it does |
|---|---|
| Staged buys, then exit | Buys in tranches from the start, one every interval, then sells a share a delay later. |
| Dip buy | Buys once when the market cap first falls to a ceiling. |
| Buy, then take profits | Buys at the start, then sells a share at each of up to three market caps. |
| DCA in a band | Buys on a fixed interval while the market cap sits inside a band. |
| Counter-trade | On your own pool, inside a market-cap band: buys after a bar where sellers outweighed buyers and sells a share after one where buyers did. |
Bring your own#
- From Pine Script: paste a TradingView strategy and ftw.trade translates it to Flowscript and compiles it, or tells you which line it can't.
- From your AI: describe the idea. The assistant (or Claude, ChatGPT and Codex through MCP) writes it, checks it and backtests it.
- From the module library: every protocol and data module comes with a working example. See Modules.