Open the Study Editor, compile the built-in starter study, and watch it land on a live chart — step by step.
This walks you from a fresh terminal to a working custom study on a chart, using the built-in Study Editor and the study it comes preloaded with. You will not install a compiler, create files by hand, or restart anything.
Compile & Load is gated to Pro.From the terminal menu bar choose Custom Studies › Study Editor…. A separate editor window opens. It is a real code editor: a line-number gutter, C++ syntax highlighting, find/replace, and an OUTPUT pane along the bottom for compiler messages.
STUDY FILE | The study's file/name base (top-left). Defaults to my_sma. Non-identifier characters are sanitized to underscores when the file is written. |
Compile & Load | Builds the current source with the bundled compiler and hot-loads it. Also bound to Ctrl+Enter. |
OUTPUT | The compiler's merged output plus the load result. Green on success, red on failure. |
| Ctrl+F | Find. Ctrl+H is find/replace, F3 / Shift+F3 step matches, Esc closes the bar. |
Re-check button. On a healthy install there is no strip — the bundled compiler is already found.The editor opens preloaded with a complete, compilable study — a simple moving average drawn on the price plane. This is the whole file:
Every entry point a study needs is here: it reports the ABI version, describes itself for the Add-Study menu, declares one integer input (period), allocates one line subgraph, and fills it with a rolling mean of the close. You do not need to understand every line yet — the Worked Examples page dissects this exact study line by line.
Press Compile & Load (or Ctrl+Enter). The compile runs in the background, so the UI never freezes. Watch the OUTPUT pane:
✓ Loaded study 'my_sma' — added to Add Study.✗ Build failed. — fix the code and press again.On success the terminal does three things automatically: it trusts the DLL (it built it from your own source), registers the study under Custom Studies › Add Study in the category you declared, and drops it straight onto the active chart. If no chart is open it opens one first.
period after it's on the chart from Custom Studies › Configure Study… — the settings dialog is built automatically from the inputs you declared.Everything is written under the terminal's studies folder (your app-data studies directory, overridable with SHARPNEL_STUDIES_DIR):
src/<name>/<name>.cpp | Your source, saved verbatim on every compile so it is always editable and recoverable. |
_session/<name>__hN.dll | The freshly built DLL, with a session-unique suffix so a re-compile never collides with a still-loaded prior build. |
<name>.dll.pending | A staged copy the terminal promotes to <name>.dll at the next startup — so your study auto-loads on future launches. |