Skip to main content
Skip to main content

Strategies overview

A strategy is a rule set that watches chart data and places signal markers — Buy, Sell, exits — when conditions are met.

If you have only used indicators before, strategies are the new idea: output is discrete trading actions, not just a line.

Loading chart…
Strategies draw signal markers; start from CROSS or EXCEED with defaults.

What you see on the chart

Strategies render as arrows or markers on the main price panel (most keys) or in a dedicated panel (POSITION, DIFFER).

They do not place real orders — your app handles execution. The chart visualizes when a rule would fire.

Standard signal vocabulary

Every strategy input/output uses the same Fusion signal set:

SignalTypical meaning
BuyOpen / add long
SellOpen / add short
Exit longClose long
Exit shortClose short
Exit allFlatten everything
Do nothingNo action this bar

List inputs (e.g. ONDN, ONUP) let you pick which signal fires for each rule branch.

Strategies vs indicators vs functions

QuestionIndicatorFunctionStrategy
Output type?Numeric seriesNumeric seriesSignals
Example outputRSI 0–100Shifted EMABuy arrow
Good forAnalysisCustom mathRules & backtest UX
Default chartLine / histogramLineMarkers
flowchart LR
Price["Price / indicators"]
Strat["Strategy rules"]
Markers["Buy / Sell markers"]
Pos["POSITION panel"]

Price --> Strat --> Markers
Strat --> Pos

All 11 built-in strategies

KeyDisplay nameWhat it does (plain English)
CROSSCrossSignal when series A crosses series B
EXCEEDExceedSignal when price/series breaks above/below bands
REBOUNDReboundSignal when series returns inside a band range
GREATERLESSGreater-LessSignal when A >, <, or = B
CANDLESTICKPATTERNSCandlestick PatternsPattern detected on OHLC → signal
SINGLESingle SignalsRemove duplicate consecutive signals
JOINJoinCombine two strategies (fixed matrix)
DOUBLECHECKDouble CheckFire only when both strategies agree
MIXSelective SignalsCombine two strategies (editable matrix)
POSITIONPosition SizeTurn signals into position-size line (new panel)
DIFFERBuy Sell SizeTurn position size into buy/sell deltas (new panel)

Full inputs: Strategy catalog.

Tier 1 — try with defaults

These ship with sensible default series (often MACD or Bollinger + OHLC):

chart.addScript("CROSS");
chart.addScript("EXCEED");
chart.addScript("CANDLESTICKPATTERNS");

CROSS defaults to MACD line vs MACD signal — add MACD first or change series inputs to EMA/SMA in settings.

Tier 2 — composition strategies

Use after you have strategy output series on the chart:

KeyNeeds
JOIN, DOUBLECHECK, MIXTwo strategy streams (X, Y)
SINGLEOne strategy stream to dedupe
POSITIONStrategy stream → position histogram
DIFFERPosition-size stream → trade deltas

Example chain:

  1. CROSS on EMA vs SMA → signals
  2. POSITION on that stream → position panel
  3. DIFFER on position → sized buy/sell markers

Programmatic wiring has copy-paste code.

Pick input series (critical)

Strategies are only as good as their series inputs:

  • CROSSLINE (A) and SIGNAL (B)
  • EXCEED → upper/lower bands + price series
  • GREATERLESS → compare any two lines

In ChartUI, each series input is a dropdown — same system as indicators (Series and panels).

Panel behavior

KeysDefault placement
Main chart markersCROSS, EXCEED, REBOUND, GREATERLESS, JOIN, MIX, SINGLE, DOUBLECHECK, CANDLESTICKPATTERNS
New panelPOSITION, DIFFER

Override with Panel in settings.

Visibility

Chart settings → On chart → Strategies toggles signal visibility.

API: setChartStrategyVisibility, removeChartStrategy.

Add from ChartUI

  1. Toolbar → Indicators → tab Strategy.
  2. Pick a strategy → configure series and signal lists.
  3. Choose Panel → OK.

What is next?