Darvas Box logo

Darvas Box

Community
mrhustlex
darvas-box

Nicolas Darvas Box Theory. Draw boxes around price consolidations; buy when price breaks above the box top on volume, stop just below the box bottom. Combined with Jesse Livermore's pyramiding + cut-loss discipline. yfinance-based box detector.

Overview

Publishermrhustlex
RepositoryTrading-Masters-Strategies
Skill namedarvas-box
Stars
28
Forks
6
Bundled files
2
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 2 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by mrhustlex on GitHub. Read the source before you install it.

Installation

Install the Darvas Box AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/mrhustlex/Trading-Masters-Strategies/tree/main/skills/darvas-box
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/mrhustlex/Trading-Masters-Strategies.git /tmp/Trading-Masters-Strategies
mkdir -p .claude/skills
cp -r /tmp/Trading-Masters-Strategies/skills/darvas-box .claude/skills/darvas-box
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Darvas Box in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Darvas Box on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Darvas Box is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Nicolas Darvas — Box Theory (+ Livermore discipline) (v1.0)

Goal: catch a stock as it steps up in a series of boxes. Darvas turned $10k→$2M in 18 months (1950s) with this. Jesse Livermore's rules (pyramid into winners, cut losers immediately) are folded in as the risk layer.

0. Plain English

A stock runs, pauses, ranges = one "box" (floor = recent low, ceiling = recent high). When it breaks above the ceiling on volume, buy. Your stop is the box floor. If it keeps running, a new higher box forms — trail your stop up to each new floor (pyramiding / riding). If price drops below the floor → stop out.

1. Exact rules (as coded in references/darvas.py)

  • Box = rolling window: floor = min low, ceiling = max high over last N days (default 20).
  • Buy signal: close > ceiling AND volume > 1.4× 50d avg AND price > box-floor.
  • Stop: just below box floor (tight, structural).
  • Trail: as price makes new highs, raise stop to the most recent box floor (Livermore: never let a profit become a loss).
  • Pyramid: only add on a new box breakout above the prior ceiling, never in the middle.

2. Livermore discipline layered on top

  • Cut losses at the box floor — no exceptions. Never average down.
  • Let winners run; move stop to breakeven after first box confirms.
  • Buy strength, not weakness — boxes form after rallies, not in declines.
  • Don't trade chop — a box needs a clear floor/ceiling, not noise.

3. Script

references/darvas.py scans a ticker/universe, detects the current box (floor/ceiling), reports if price is breaking out, and the trailing stop.

bash
cd <skill>/references
python3 darvas.py NVDA APH
python3 darvas.py --universe ../universe.txt

4. Reality notes

  • Box length N matters: 10–20d for swing, 20–50d for position. Script default 20.
  • A parabola (see Minervini skill) has no real box — it's a vertical line; Darvas would NOT buy (no defined floor to stop under). Avoid.
  • Spin-offs (SNDK) = fake boxes early; chart-verify.

5. Pitfalls

  • ❌ Buying a breakdown through the floor (that's the stop, not entry).
  • ❌ Widening the stop below the floor.
  • ❌ Pyramiding into a parabola.
  • ❌ Trading a box in a Stage-4 stock (Weinstein) — check stage first.

Compiled 2026-08-17 from Darvas "How I Made $2,000,000 in the Stock Market" + Livermore "Reminiscences". Not financial advice.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Darvas Box AI skill do?

Nicolas Darvas Box Theory. Draw boxes around price consolidations; buy when price breaks above the box top on volume, stop just below the box bottom. Combined with Jesse Livermore's pyramiding + cut-loss discipline. yfinance-based box detector.

Why use Darvas Box on TypingMind?

Because you install it once and use it with any model. Darvas Box is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Darvas Box in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/mrhustlex/Trading-Masters-Strategies/tree/main/skills/darvas-box. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Darvas Box?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Darvas Box?

As many as you like. As long as a model supports skills, you can use Darvas Box with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Darvas Box AI skill free?

Yes. It is published on GitHub by mrhustlex under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇