Skip to content

Configuration & Templates

Syed Ibrahim Omer edited this page Apr 13, 2026 · 1 revision

Configuration & Templates

indicators-cli supports two JSON inputs:

  1. Indicators config (-c, --config_json): override indicator window sizes by period and timeframe.
  2. Timeframe mapping (-t, --timeframe): provide a JSON file mapping each period to a timeframe.

1) Indicators JSON config (--config_json)

Defaults

Default values live in the repo at src/default_configs.json. If a key is missing from your config file, the CLI falls back to defaults.

Shape

Top-level keys are indicator window names. Each key maps:

<period><timeframe><int>

Example (partial):

{
  "sma_window": {
    "5y": { "1d": 100 }
  },
  "rsi_window": {
    "5y": { "1d": 21 }
  }
}

Usage:

indicators AAPL -c my_config.json

Window keys

These are the keys used by the CLI today:

  • sma_window
  • ema_window
  • macd_short
  • macd_long
  • macd_signal
  • rsi_window
  • bb_window
  • roc_window
  • atr_window
  • stochastic_window

Tip: you don’t need to specify all keys—anything missing falls back to defaults.

Worked example: override one window safely

If you only want to change RSI for 5y daily, you can supply just that key:

{
  "rsi_window": {
    "5y": { "1d": 21 }
  }
}

Everything else stays on defaults.

2) Timeframe mapping JSON (--timeframe as JSON file)

Instead of a single interval like 1d, you can pass a JSON file that maps each period to an interval.

Example timeframe.json:

{
  "ytd": "1d",
  "1y": "1d",
  "2y": "1wk",
  "5y": "1mo",
  "10y": "3mo",
  "max": "3mo"
}

Usage:

indicators AAPL -t timeframe.json

Related pages:

Clone this wiki locally