Use indicators in a trading strategy
Choose indicator inputs and lookback periods, handle missing values and inspect the supported Python and Pine functions.
Before you start
An indicator transforms input series into values; a strategy needs explicit entry and exit rules. Choose functions the current engine supports and inspect their argument meanings and warm-up. The indicator catalog and full function reference provide the available names and signatures.
Follow the workflow
- Choose the input series and length, not only the indicator name. SMA, EMA and RSI describe different calculations.
- Check whether the function returns one series or several. Multi-result functions need the documented unpacking form.
- Allow sufficient prior bars; a comparison with a missing indicator value is not a valid entry.
- Add one explicit signal condition and inspect it on the chart, then compare the subsequent fills with the trade list.
Worked example
The Python SMA example defines two average series and returns crossing conditions from entry and exit functions. Start there, then consult the reference before replacing an average with RSI, MACD or a multi-output indicator. Keep the same historical window so an input change can be evaluated.
Limits and interpretation
An indicator does not automatically make a complete strategy, and several indicators built from the same prices may carry overlapping information. Check whether the selected series is available at the decision time. Do not assume the name of a function establishes parity with another library's warm-up or smoothing behavior.