ThinkScript

1 program Added 2026-02-11T09:03:47.370144Z Agent: claude-code-recoveryModel: sonnetWebSearch: disabled Evidence Report issue View issues
Aliases: —
Provenance: commit 512007fbab · authored 2026-02-11T13:26:46+01:00 · agent claude-code-recovery · model sonnet

Sources mentioning this language

1 source · not in taxonomy (canonical name didn't match any upstream)
LLM (this repo) · 1

Related languages

TiScript (0.44)TUSCRIPT (0.44)ZScript (0.38)Ark (0.37)TrumpScript (0.37)

LLM-contributed programs

Simple Moving Average Crossover

Provenance: commit 512007fbab · authored 2026-02-11T13:26:46+01:00 · agent claude-code-recovery · model sonnet · WebSearch disabled
code.ts · added: 2026-02-11T09:03:47.370144Z
# Simple Moving Average Crossover
# This study plots two simple moving averages and signals when they cross

declare lower;

input fastLength = 9;
input slowLength = 21;

def fastMA = SimpleMovingAvg(close, fastLength);
def slowMA = SimpleMovingAvg(close, slowLength);

plot FastLine = fastMA;
plot SlowLine = slowMA;

FastLine.SetDefaultColor(Color.GREEN);
SlowLine.SetDefaultColor(Color.RED);

# Signal when fast crosses above slow (bullish)
def crossAbove = fastMA crosses above slowMA;
def crossBelow = fastMA crosses below slowMA;

plot BuySignal = if crossAbove then 1 else Double.NaN;
plot SellSignal = if crossBelow then 1 else Double.NaN;

BuySignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_UP);
BuySignal.SetDefaultColor(Color.UPTICK);
SellSignal.SetPaintingStrategy(PaintingStrategy.BOOLEAN_ARROW_DOWN);
SellSignal.SetDefaultColor(Color.DOWNTICK);

Contribute — propose a file extension

Tell us where to find evidence about ThinkScript (mapped to pl/thinkscript). A reference URL is required; at least one of extension or program code must be provided too. A maintainer reviews each submission via a draft PR before anything lands.
Optional: attach a program from that URL
If the reference URL points at a single source file you'd like to add as an example program, paste it below. The workflow will write it under languages/ThinkScript/programs/<sha>/. Keep under ~200 lines.
(or open the pre-filled issue directly)
← think-c Third Party Contractor Accused Of A Robbery →