Skip to main content

One post tagged with "trading"

View All Tags

MultiChart for Financial Markets — A Practical Guide

· 9 min read
ApudFlow OS
Platform Updates

This guide shows how to use MultiChart to analyze financial markets faster and with more confidence. It covers what MultiChart can render, proven layer recipes, practical workflows, and why a single, layered view is a real edge.

What is MultiChart?

MultiChart combines multiple visualization layers on a single time axis. You can stack price, indicators, alternative chart types, volume, heatmaps, and order‑flow insights in one view with interactive legend, tooltip, and last‑value chips.

Supported layers (at a glance)

  • Price: Candle, Heikin Ashi, Bar, Equivolume
  • Lines & areas: Line, Tick, Area, Mountain (gradient)
  • Brick‑based: Renko, Range Bar, Point & Figure, Kagi
  • Indicators: Bollinger Bands, Ichimoku (Tenkan/Kijun/Span A/B cloud/Chikou)
  • Volume & order flow: Volume (bottom band), Footprint (candle + buy/sell levels)
  • Events/metrics: Bubble (size/color encodings), Heatmap (time × Y‑category in bottom band)

Tooltip shows context‑aware values (e.g., OHLC, Bollinger M/U/L, Ichimoku T/K/A/B/Ch, Volume). Legend above the chart lets you toggle layers instantly; last‑value chips on the right give a quick read of the latest levels.

Why this is a real advantage

  • Single timeline context: No more tab hopping across tools; compare signals at the exact same moment.
  • Faster synthesis: Tooltip consolidates values across all visible layers under your cursor.
  • Fewer blind spots: Mix complementary views (trend + volatility + volume + structure) to reduce false positives.
  • Multi‑timeframe ready: Layer slow trend context with faster execution signals on the same canvas.
  • Lower cognitive load: Top legend toggles, descriptive layer picker, and last‑value chips keep focus on the price action.
  • Robust data path: Backend normalizes inputs (safe parsing, append mode, rowsExpr), so display stays resilient.

Quick start (3–5 minutes)

  1. Add a MultiChart widget.
  2. Click “Add layer” and select a type (each option has a short description).
  3. Provide layer data (see formats below) and hit Apply.
  4. Repeat for 2–4 layers; keep it lean for clarity.
  5. Use the legend to toggle layers; hover for the tooltip; glance right for last values.

Tip: For large inputs, set a Global limit for smooth performance.

Proven recipes for markets

  • Trend following (clean + context)

    • Candle + Ichimoku (Tenkan/Kijun + cloud) + Volume
    • Read cloud bias and Tenkan/Kijun crosses; confirm with volume expansions.
  • Mean reversion / volatility bands

    • Candle + Bollinger Bands (+ Line for mid)
    • Fade extremes back to middle in ranges; avoid when trend/cloud bias is strong.
  • Noise reduction for structure

    • Renko or Range Bar + Kagi
    • Reveal swing structure and reversals; helpful for stop placement and breakouts.
  • Order flow confidence

    • Candle + Footprint + Volume
    • Watch footprint imbalance near prior highs/lows; confirm with volume spikes on breaks or rejections.
  • Event overlays

    • Candle + Heatmap (categories: events/signals/flows)
    • Correlate price response to discrete events without leaving the chart.
  • Momentum with confirmation

    • Heikin Ashi + Mountain (momentum line) + Bollinger mid
    • Smooth candles, slope + pullback to mid as continuation entries.

Multi‑timeframe layering

  • Use slower layer(s) for bias (e.g., Ichimoku, Mountain/Area of higher timeframe feed).
  • Add a faster execution layer (Tick/Line) to refine entries around key levels.
  • Toggle slow layers off temporarily when managing precise execution.

Interactions that speed you up

  • Top legend: toggle layers instantly, no menus.
  • Tooltip: vertical guide + consolidated lines per layer under your cursor.
  • Last‑value chips: right‑side labels with connectors; see the latest level per layer at a glance.

Data formats (summary)

  • Candle/Heikin/Bar/Equivolume: { ts, o, h, l, c, (volume) }
  • Line/Tick/Area/Mountain: { ts, value }
  • Renko/Range Bar/Point & Figure: { ts, o, c, up }
  • Bollinger: { ts, middle, upper, lower }
  • Kagi: { ts, value, thick, up }
  • Volume: { ts, volume }
  • Footprint: { ts, o, h, l, c, (volume), (levels:[{ price, buy, sell }]) }
  • Bubble: { ts, value, size, (colorValue) }
  • Ichimoku: { ts, value } for each of: tenkan/kijun/spanA/spanB/chikou
  • Heatmap: { ts, y, value } (Y = category label)

Notes:

  • ts in seconds (Unix). Heatmap/Volume draw in bottom bands and don’t affect price scale.
  • Ichimoku lines are considered in price range calculation; Heatmap is excluded.

Performance tips

  • Keep 3–6 layers visible; hide diagnostic layers via legend as needed.
  • Use Global limit or pre‑downsample on the backend for very large histories.
  • Prefer Area/Mountain/Line over highly granular Tick when you only need trend context.

Risk & usage notes

  • This is an analysis tool, not investment advice.
  • Validate strategies out‑of‑sample; combine price, volume, and structure for robustness.
  • Be mindful of liquidity and execution costs when translating signals to orders.

Next steps

  • Add Y‑axis labels for Heatmap categories (coming).
  • Per‑component toggles for Ichimoku in the configurator.
  • Persist layer visibility state across sessions.

With MultiChart, you can compress the analysis loop: one chart, multiple truths. Less context switching, more time spent on decisions that matter.

Examples: market playbooks

Below are practical, step‑by‑step setups you can reproduce quickly.

1) Intraday breakout with volume confirmation

  • Layers: Candle + Volume + Footprint + Heatmap (events/news/sessions)
  • Read:
    • Mark prior session high/low or pre‑market extremes (Heatmap category = level).
    • Watch for price consolidation under the level; then break with a volume spike (Volume) and buy‑side imbalance on Footprint.
    • Tooltip confirms the candle OHLC and footprint context exactly at break.
  • Execution:
    • Entry on break/close above level with footprint buy > sell.
    • Invalidation if price re‑enters range and footprint flips (sell imbalance) on pullback.
    • Take partials into the next HTF level; trail using prior 1–2 candle lows.

2) Swing trend following with Ichimoku

  • Layers: Heikin Ashi (or Candle) + Ichimoku + Volume
  • Read:
    • Cloud color/position for bias; Tenkan crossing above Kijun for momentum.
    • Chikou above price confirms trend maturity; Volume upticks on legs.
  • Execution:
    • Enter on pullback to Kijun with Tenkan rising and cloud supportive.
    • Exit/trail when Tenkan crosses down or price closes inside/opposite the cloud.

3) Range mean reversion with Bollinger

  • Layers: Candle + Bollinger Bands (±2σ) + Volume (filter)
  • Read:
    • In sideways regimes, tests of Upper/Lower bands tend to revert to the Middle.
    • Avoid when Volume expands in the direction of the move (possible regime shift).
  • Execution:
    • Fade near band extremes back to the middle; stop outside the band; reduce when volume expands.

4) Multi‑timeframe overlay

  • Layers: Mountain (HTF feed; e.g., 4H) + Candle (LTF; e.g., 15m) + Bollinger mid
  • Read:
    • Use Mountain slope as higher‑timeframe bias; focus on LTF continuation in that direction.
    • Bollinger mid on LTF serves as a dynamic pullback reference.
  • Execution:
    • Enter on LTF pullback to the mid in the direction of HTF slope; exit on mid loss or slope flattening.

5) Structure & stops with Renko/Kagi

  • Layers: Renko (or Range Bar) + Kagi
  • Read:
    • Clean swing structure and reversal points; Kagi thickness highlights trend vigor.
  • Execution:
    • Place stops beyond the prior brick swing; enter on Kagi thickening in trend direction.

rowsExpr examples (Eval, no JSON)

Prefer passing expressions that evaluate to a list of dictionaries. You can reference two built‑in scopes: vars and data. If your platform supports mustache, you can wrap the expression, e.g. {{ ... }}.

Tip: Ensure timestamps are Unix seconds. If your source is in milliseconds, convert with r['ts'] // 1000 in a list comprehension.

Candle (from Yahoo feed in vars)

type: Candle
rowsExpr: "{{ vars['fetch_yahoo_n_v7is']['data'] }}"
open: "o"
close: "c"
high: "h"
low: "l"
timestamp: "ts"
limit: 500

If your ts is in milliseconds:

rowsExpr: "[{'ts': r['ts']//1000, 'o': r['o'], 'h': r['h'], 'l': r['l'], 'c': r['c']} for r in vars['fetch_yahoo_n_v7is']['data']]"

Line (close as a single value series)

type: Line
rowsExpr: "[{'ts': r['ts'], 'value': r['c']} for r in vars['fetch_yahoo_n_v7is']['data']]"
timestamp: "ts"
fields: "value"
shade: false

Volume (bottom band)

type: Volume
rowsExpr: "[{'ts': r['ts'], 'volume': r.get('volume') or r.get('v') or 0} for r in vars['fetch_yahoo_n_v7is']['data']]"
timestamp: "ts"

Ichimoku (computed server‑side from OHLC)

Use the same OHLC rows; the worker computes Tenkan/Kijun/Span A/B/Chikou.

type: Ichimoku
rowsExpr: "{{ vars['fetch_yahoo_n_v7is']['data'] }}"
open: "o"
close: "c"
high: "h"
low: "l"
timestamp: "ts"

Bollinger Bands (precomputed in vars)

If you already have bands in vars['bb_20_2'] with middle/upper/lower:

type: Bollinger
rowsExpr: "{{ vars['bb_20_2'] }}"
timestamp: "ts"
middle: "middle"
upper: "upper"
lower: "lower"

Or derive from closes on the fly (simple example, pseudo‑rolling):

rowsExpr: "(lambda rows: [
{'ts': rows[i]['ts'], 'middle': sum([r['c'] for r in rows[i-19:i+1]])/20,
'upper': (sum([r['c'] for r in rows[i-19:i+1]])/20) + 2*(((sum([(r['c']- (sum([q['c'] for q in rows[i-19:i+1]])/20))**2 for r in rows[i-19:i+1]])/20))**0.5),
'lower': (sum([r['c'] for r in rows[i-19:i+1]])/20) - 2*(((sum([(r['c']- (sum([q['c'] for q in rows[i-19:i+1]])/20))**2 for r in rows[i-19:i+1]])/20))**0.5)
} for i in range(19, len(rows))
])(vars['fetch_yahoo_n_v7is']['data'])"

Heatmap (events → categories)

Map heterogeneous event arrays into a unified shape { ts, y, value }:

type: Heatmap
rowsExpr: "
([{'ts': e['ts'], 'y': 'earnings', 'value': 1} for e in vars.get('earnings', [])] +
[{'ts': n['ts'], 'y': 'news', 'value': 1} for n in vars.get('news', [])] +
[{'ts': s['ts'], 'y': 'session-open', 'value': 1} for s in vars.get('sessions', [])])
"
timestamp: "ts"
category: "y"
value: "value"

Footprint (order flow with price levels)

If your order‑flow provider is stored under vars['oflow']:

type: Footprint
rowsExpr: "{{ vars['oflow'] }}"
open: "o"
close: "c"
high: "h"
low: "l"
timestamp: "ts"
levels: "levels" # array of { price, buy, sell }

Notes

  • You can pass a Python list directly as rowsExpr (no mustache needed).
  • safe_eval sees: vars, data, and a small set of built‑ins (sum, len, min, max, sorted, list comprehensions, etc.).
  • If a layer expects OHLC, provide field names via mapping options (open/close/high/low/timestamp).

Checklist before trading

  • Data sanity: timestamps increasing, fields present (e.g., o/h/l/c, value, volume).
  • Visibility: keep 3–6 layers; hide diagnostics via legend on demand.
  • Regime: trend vs. range — pick the recipe that matches the regime.
  • Confirmation: volume or footprint to back price signals.
  • Risk: define invalidation (where the idea is clearly wrong), not just target.