Code · Beginner
FlowScript: Code Your Own Indicators
From your first line to a published indicator or backtest: values per bar, inputs, history, signals, state, functions, lists, drawings, sessions, delta, other timeframes and strategies.
What you’ll learn
- Write, run and fix a script in Flow Studio
- Add inputs so traders can tune your indicator without code
- Use history (close[1]) and built-in functions like ema, rsi and atr
- Turn conditions into signals, bar colors and alerts
- Keep state across bars with var
- Write your own functions, and use lists and maps
- Draw labels, lines, boxes and dashboard tables
- Use session levels, delta and higher timeframes
- Backtest a strategy with entries, brackets and a report
- Publish an indicator to the Script Library
Lessons
- Your first script (7 min): Three lines that draw an average, and how FlowScript runs them.
- Inputs: settings without code (7 min): Let traders tune lengths, colors, sources and switches from the settings dialog.
- History and built-in functions (9 min): Look back with [n], and lean on 70+ built-ins instead of doing the math yourself.
- Conditions, signals and alerts (9 min): if blocks, crossovers, markers, bar colors and alert conditions.
- State that carries across bars: var (9 min): Counters, trailing levels and session highs, values that remember.
- Your own functions, lists and maps (11 min): Package logic with def, keep many values in a list, and count things in a map.
- Labels, lines, boxes and tables (10 min): Draw objects you can keep, move and delete, and build a dashboard.
- Sessions, delta and other timeframes (10 min): Prior-day and overnight levels, buy-minus-sell volume, and the daily trend on an intraday chart.
- Backtest a strategy (11 min): Entries, stop and target brackets, end-of-day exits, and how to read the report honestly.
- Polish, publish and share (7 min): Make it readable, test it on different charts, and publish it to the library.