How ykunakorn/tradingview-indicator works
1. Repository purpose
- This repo is a small collection of TradingView Pine Script indicators, centered on a custom 3-candlestick pattern detector and related technical-analysis overlays.
2. Execution boundary
- There is no server-side architecture here.
- All logic runs inside TradingView’s Pine Script runtime on the chart, using the platform’s built-in market data and indicator APIs.
3. Main artifacts
- 3candlesticks.pine appears to be the primary script for the multi-candle pattern indicator.
- WindsurfEMA.pine is likely a separate EMA-based indicator.
- essentian_indicator.pine is another standalone indicator script, probably a companion or variant.
- The scripts are best treated as independent modules, not as a compiled application with shared runtime state.
4. Primary data flow
- Input: OHLCV bar data from the currently loaded TradingView symbol/timeframe.
- Processing: Pine Script logic evaluates candlestick relationships, indicator conditions, and thresholds.
- Output: visual markers, highlights, plotted lines/shapes, and possibly alerts on the chart.
5. Core functional subsystem
- The central subsystem is pattern detection for 3-candle setups such as Morning Star / Evening Star-style formations.
- This subsystem likely computes candle body/wick relationships and validates conditions across consecutive bars.
6. Visualization subsystem
- Signals are rendered directly on the chart, which is the main user-facing output.
- Typical outputs in Pine indicators are shapes, labels, colored bars/backgrounds, and plotted series; this repo is built around that chart-overlay model.
7. Configuration boundary
- The indicator is intended to expose input parameters so traders can tune detection sensitivity and visual behavior.
- In architecture terms, these inputs are the only “configuration layer”; there is no external config service or persistence layer.
8. Likely supporting indicator logic
- The presence of WindsurfEMA.pine suggests an EMA trend filter or smoothing component may be used either as a standalone tool or as a companion signal layer.
- essentian_indicator.pine suggests additional signal logic or a more general-purpose indicator variant, but still within the same Pine-script/chart-overlay architecture.
9. External dependencies
- The only meaningful external dependency is TradingView itself: Pine editor, chart engine, and optionally TradingView alerts.
- No databases, APIs, message queues, or deployment infrastructure are present in the repository.
10. Repo/documentation mismatch
- The README refers to indicator.pine, but that file is not in the tree.
- For diagramming purposes, treat 3candlesticks.pine as the primary implementation unless the missing file exists elsewhere.
11. How to diagram it
- Draw a single boundary labeled TradingView / Pine Script runtime.
- Inside it, show separate indicator scripts fed by market price bars.
- Show the main 3-candle detector producing chart signals, with optional companion indicator scripts (EMA / essential indicator) as parallel modules.
Main entry points: 3candlesticks.pine 3 Candles · essentian_indicator.pine Essential Indicator · WindsurfEMA.pine Windsurf EMA
Components 7
TradingView / Pine Script runtime
Chart-side execution boundary for all indicator scripts
- 3 Candles · Primary multi-candle pattern detector for Morning Star / Evening Star-style setups
3candlesticks.pine - Windsurf EMA · Standalone EMA-based indicator or companion trend overlay
WindsurfEMA.pine - Essential Indicator · Additional standalone Pine indicator script
essentian_indicator.pine - Inputs · Trader-tuned sensitivity and display parameters exposed by Pine inputs
- Chart signals · Shapes, labels, plots, bar colors, and highlights drawn on the chart
- Alerts · Optional TradingView alerts derived from indicator conditions
Other components
- Market bars · Current symbol/timeframe price bars from TradingView
Connections 11
- Market bars → 3 Candles: bars · Feeds OHLCV bars into the candle-pattern logic
- Market bars → Windsurf EMA: bars · Feeds bars into EMA calculations
- Market bars → Essential Indicator: bars · Feeds bars into companion indicator logic
- Inputs → 3 Candles: tune · Configures detection thresholds and visual behavior
- Inputs → Windsurf EMA: tune · Configures EMA parameters and display options
- Inputs → Essential Indicator: tune · Configures companion indicator parameters
- 3 Candles → Chart signals: render · Emits pattern markers and overlays
- 3 Candles → Alerts: signal · Optional alert conditions for detected setups
- Windsurf EMA → Chart signals: render · Emits trend overlay or filtered visual cues
- Essential Indicator → Chart signals: render · Emits additional chart annotations or plots
- Essential Indicator → Alerts: signal · Optional alert conditions for its own setups