Grab the skill file
The whole recipe also ships as a single agent-skill file:- Download: docs.hyperprop.com/skill.txt — save it as
SKILL.md(for example.cursor/skills/hyperprop-script/SKILL.mdin your project, or paste it straight into your assistant). - Copy: the full file is at the bottom of this page in one copyable block.
compute, that receives
the full bar series and returns everything to draw. There is no per-bar
execution model and no persistent state between runs — compute is a pure
function of (bars, inputs).
Scripts are created in the web terminal: Indicators → My scripts → Create
script. Errors never break the chart; they render as a red inline message in
the pane. Scripts sync to the user’s other devices (including mobile)
automatically.
The contract
Input declarations
All return the resolved live value.opts = { key?, min?, max?, step? }.
Keys default to a slug of the label; pass key to keep saved settings stable
across label renames.
TA helpers (hp)
All series helpers take and return Array<number | null> aligned to bars.
Nulls mark “no value yet” — always null-check before arithmetic.
Anything else is ordinary JavaScript — write your own loops and math freely.
Drawing primitives
X coordinates are bar indices intobars. Fractional values and indices
past the last bar are fine (the axis extrapolates), so zones and rays can
extend into the future. Y is a price (overlay) or the script’s own value
(separate pane). Boxes and bg bands render under the series; lines,
markers, and labels render on top. Everything clips to the pane. Hard cap:
2000 items per type — return only what is currently visible/alive, never
the full history.
rgba() colors for translucent zone fills. Plots:
Hard limits — design around these
- 1000 ms execution budget per
compute, enforced with loop guards. A script that exceeds it is circuit-broken until edited. Keep hot loops O(bars); avoid O(bars²) rescans. - Synchronous only. No
async, nofetch, no timers —computemust return its result directly. - Single symbol. Scripts only receive the chart’s own bars. No
cross-symbol or cross-timeframe data (Pine
request.securitycannot be ported). - No main-series restyling. Pine
plotcandle/barcolorhave no equivalent. - No persistence. Model “current state” by replaying the rules over the
series inside
compute(see the signal recipe).
Recipes
Oscillator (separate pane)
Zones / order blocks (overlay, boxes + markers)
The core pattern for supply/demand, FVG, and session-level indicators: build each zone’s lifecycle (created / mitigated), then emit boxes only for zones still alive at the last bar.Signal engine (entry/SL/TP with history)
Pine keepsvar state across bars; here, replay the state machine in one
sequential loop. One active signal at a time; finished signals become faded
markers.
Session shading (bg bands)
Intl.DateTimeFormat is available for timezone math:
Porting from Pine Script
Pine’s per-bar drawing mutation (create → move → delete) collapses into one
question: what should be visible right now? Compute final state once.
Workflow
- Write the script (top-level
input.*declarations +compute). - In the terminal: Indicators → My scripts → Create script, paste, choose Overlay or Separate pane, then Save & add to chart.
- Compile or runtime errors appear inline in the pane in red — fix and resave. A budget-exceeded script stays disabled until edited.
- Settings changes in the UI re-run
computelive; verify inputs by watching the legend values update.
The full skill file
One block, copy button top right — paste it into any AI coding assistant:SKILL.md