FX: trend & momentum
For fX trend followers and systematic macro
Trend, momentum and range position for the majors, which carry live indicators, and return rankings from daily history for any pair.
- Financial markets
- 6 steps
- Runs on live data
Built for
How EquationDB answers it
Each step is one query on live data. Run them in order, or open any one and adapt it: change the symbol, the station, the dates or the filter.
Majors: trend table
Each major against its 50- and 200-day averages, its RSI, trend strength (ADX) and distance from the 52-week high.
GET fx.majors SELECT symbol, close, sma(50), sma(200), rsi(14), adx(14), dist_high(252)
Majors ranked by 3-month momentum
The classic cross-sectional FX momentum ranking: which majors have trended hardest over one, three and six months.
GET fx.majors SELECT symbol, close, roc(21) AS one_month, roc(63) AS three_months, roc(126) AS six_months SORT three_months DESC
Overbought and oversold majors
RSI on two horizons with the 52-week range, strongest first: stretched pairs sit at the top and bottom of the table.
GET fx.majors SELECT symbol, close, rsi(14), rsi(2), dist_low(252), dist_high(252) SORT rsi(14) DESC
EURUSD trend over the past year
A year of EURUSD with its averages and RSI, ready to chart. Swap in any major.
GET EURUSD SELECT close, sma(50), sma(200), rsi(14) LAST 1y
Monthly returns of the majors
Month-by-month returns for each major from daily bars: the raw material for a heatmap of who led when.
SELECT symbol, date_trunc('month', timestamp) AS month, sum(ret) AS month_ret FROM bars WHERE symbol IN ('EURUSD', 'USDJPY', 'GBPUSD', 'USDCHF', 'AUDUSD', 'USDCAD', 'NZDUSD') AND timestamp >= '2025-01-01' GROUP BY symbol, month ORDER BY month, symbolEmerging-market currencies: one-year performance
Twenty emerging-market currencies against the dollar, ranked by their one-year move from daily history (a positive number is a weaker local currency). Edit the list for any pairs.
SELECT symbol, sum(ret) AS ret_1y, count(*) AS days FROM bars WHERE symbol IN ('USDTRY', 'USDMXN', 'USDZAR', 'USDBRL', 'USDINR', 'USDCNY', 'USDIDR', 'USDKRW', 'USDPLN', 'USDHUF', 'USDCZK', 'USDCLP', 'USDCOP', 'USDTHB', 'USDPHP', 'USDSGD', 'USDHKD', 'USDILS', 'USDEGP', 'USDNGN') AND timestamp >= dateadd('d', -365, today()) GROUP BY symbol HAVING count(*) > 200 ORDER BY ret_1y DESC LIMIT 25
Run it on your own question
Sign in and press Try it on any step, or ask for a short demo on your data.
More financial markets use cases
- Global & emerging markets: Dubai vs USEM funds, Gulf allocators, global macro PMs
- FX: market snapshotFX traders, macro desks and treasury teams
- FX: volatility & riskFX risk managers, options traders and treasury
- FX: dollar & cross-assetCross-asset allocators and macro strategists
- FX: backtests & seasonalitySystematic FX traders