Multi-Timeframe Technical Indicator Engine for Binance Data - n8n Workflow

A robust n8n workflow designed to fetch Binance k-line data and instantly calculate six major technical indicators (RSI, MACD, BB, SMA, EMA, ADX) across four timeframes (15m, 1h, 4h, 1d) via webhook triggers. This advanced n8n template provides a centralized trading calculation engine.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Algorithmic Traders needing real-time market data signals.

  • Quantitative Analysts automating data aggregation.

  • Bot Developers requiring a standardized API for technical indicator computation.

  • n8n Automation Specialists looking for advanced custom code examples for financial calculations.

Overview

This comprehensive n8n workflow acts as a centralized, high-speed computation engine for technical analysis on Binance data. It solves the critical problem of duplicating indicator calculation logic across multiple trading bots or monitoring tools.

By exposing specific webhook endpoints for 15m, 1h, 4h, and 1d intervals, this n8n template allows any upstream application to request a full set of trading indicators (RSI, MACD, Bollinger Bands, Simple Moving Average, Exponential Moving Average, and ADX). The n8n workflow handles the entire process: fetching raw k-line data from the Binance API, executing complex calculations via optimized JavaScript in Code n8n nodes, and returning a consolidated JSON output. This architecture ensures reliability, speed, and easy maintenance for your crypto trading automation built using n8n.

How it Works

The n8n workflow is structured into four parallel execution branches, each dedicated to a specific timeframe (15m, 1h, 4h, 1d).


  1. Trigger Reception: The process starts when an external application sends a POST request to a designated webhook trigger, such as the “Webhook 15m Indicators” n8n trigger. This request must contain the desired symbol (e.g., BTCUSDT).

  2. Data Fetching: The subsequent HTTP Request n8n node immediately connects to the public Binance API (/api/v3/klines), using the received symbol and the designated timeframe interval (e.g., 15m for the first branch, 1h for the second) to fetch the latest 40 candlestick data points.

  3. Data Preparation: A Merge Into 1 Array Code n8n node converts the raw API response into a single array structure, ready for calculation.

  4. Parallel Calculation: The standardized k-line data is then fed simultaneously into six specialized Code n8n node branches: Calculate Bollinger Bands, Calculate RSI, Calculate MACD, Calculate SMA, Calculate EMA, and Calculate ADX. Each n8n node executes custom JavaScript to perform its specific technical calculation (e.g., 14-period RSI, 20-period BB).

  5. Result Consolidation: A Merge n8n node aggregates the structured JSON output from all six parallel indicator calculations.

  6. Response: The final step uses the Respond to Webhook n8n node to instantly send the comprehensive, merged indicator data back to the calling system, completing the operation of this powerful n8n workflow.

Installation Guide

1. Import the n8n Workflow


  1. Copy the provided JSON code.

  2. In your n8n instance, go to the Workflows section and click 'New'.

  3. Click the three-dot menu and select 'Import from JSON'. Paste the workflow JSON.

2. Activate and Obtain Webhook URLs


  1. After importing, activate the n8n workflow.

  2. Locate the four Webhook n8n trigger nodes (15m, 1h, 4h, 1d).

  3. Copy the unique URL for each webhook path (e.g., .../webhook/39cc366c-af5f-472a-9d48-bbe30a4fe3ea). These are the endpoints your trading tools will POST requests to.

3. Setup Dependencies

Binance API: No credentials are required as this n8n workflow only utilizes the public API endpoints for k-line data.
Testing: Use a test POST request client (like Postman or a preceding HTTP Request n8n node in a calling workflow) to send a payload like {"symbol": "ETHUSDT"} to verify the calculation accuracy for each timeframe endpoint.

Node Details

Webhook 15m Indicators (n8n trigger): This is the entry point, configured to listen for POST requests at a specific path (/39cc366c-...). It captures the input payload, expecting the cryptocurrency symbol.
HTTP Request: This n8n node connects to https://api.binance.com/api/v3/klines. It dynamically sets the symbol using an expression (={{$json.body.symbol}}) and uses a fixed interval (e.g., '15m') and limit ('40') to fetch recent data.
Merge Into 1 Array (Code): A custom Code n8n node that transforms the raw Binance API array response into a single item containing a nested array of klines. This prepares the data for parallel processing by the indicator calculation Code nodes.
Calculate Bollinger Bands (Code): An advanced Code n8n node that implements the mathematical logic for Bollinger Bands (20 period, 2 standard deviation multiplier). It outputs the basis, upper, and lower band values.
Calculate RSI (Code): This Code n8n node calculates the 14-period Relative Strength Index (RSI), handling the initial smoothing and gain/loss calculation.
Calculate MACD (Code): A Code n8n node performing the Moving Average Convergence Divergence calculation (12-fast, 26-slow, 9-signal EMA periods). It outputs MACD line, signal line, and histogram values.
Calculate SMA/EMA/ADX (Code): A dedicated Code n8n node for each remaining indicator, calculating Simple Moving Average (SMA), Exponential Moving Average (EMA), and Average Directional Index (ADX) using specific periods, ensuring that this n8n workflow delivers comprehensive results.
Merge 15 min Indicators (Merge): This n8n node waits for the results from all six parallel indicator calculations to ensure the output payload is complete.


  • Respond to 15m Webhook (Respond to Webhook): The final n8n node that sends the consolidated JSON response containing all calculated technical indicators back to the initiating client application.

Related n8n Workflows

Free

Nodes: 6 Nodes
Updated: December 26 2025
View all
Created by

With 12 years of experience as a Blockchain Strategist and Web3 Architect, I specialize in bridging the gap between traditional industries and decentralized technologies. My expertise spans tokenized assets, crypto payment integrations, and blockchain-driven market solutions.

Featured*