pinescript-mcp 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pinescript_mcp/__init__.py +7 -0
- pinescript_mcp/__main__.py +6 -0
- pinescript_mcp/docs/LLM_MANIFEST.md +96 -0
- pinescript_mcp/docs/concepts/colors_and_display.md +574 -0
- pinescript_mcp/docs/concepts/common_errors.md +550 -0
- pinescript_mcp/docs/concepts/execution_model.md +1059 -0
- pinescript_mcp/docs/concepts/methods.md +543 -0
- pinescript_mcp/docs/concepts/objects.md +349 -0
- pinescript_mcp/docs/concepts/timeframes.md +73 -0
- pinescript_mcp/docs/pine_v6_functions.json +488 -0
- pinescript_mcp/docs/reference/annotations.md +229 -0
- pinescript_mcp/docs/reference/constants.md +1694 -0
- pinescript_mcp/docs/reference/functions/collections.md +2793 -0
- pinescript_mcp/docs/reference/functions/drawing.md +1082 -0
- pinescript_mcp/docs/reference/functions/general.md +1892 -0
- pinescript_mcp/docs/reference/functions/request.md +232 -0
- pinescript_mcp/docs/reference/functions/strategy.md +1517 -0
- pinescript_mcp/docs/reference/functions/ta.md +1225 -0
- pinescript_mcp/docs/reference/keywords.md +487 -0
- pinescript_mcp/docs/reference/operators.md +311 -0
- pinescript_mcp/docs/reference/pine_v6_cheatsheet.md +183 -0
- pinescript_mcp/docs/reference/types.md +405 -0
- pinescript_mcp/docs/reference/variables.md +2272 -0
- pinescript_mcp/docs/visuals/backgrounds.md +110 -0
- pinescript_mcp/docs/visuals/bar_coloring.md +35 -0
- pinescript_mcp/docs/visuals/bar_plotting.md +93 -0
- pinescript_mcp/docs/visuals/colors.md +574 -0
- pinescript_mcp/docs/visuals/fills.md +497 -0
- pinescript_mcp/docs/visuals/levels.md +91 -0
- pinescript_mcp/docs/visuals/lines_and_boxes.md +1252 -0
- pinescript_mcp/docs/visuals/overview.md +563 -0
- pinescript_mcp/docs/visuals/plots.md +390 -0
- pinescript_mcp/docs/visuals/tables.md +207 -0
- pinescript_mcp/docs/visuals/texts_and_shapes.md +862 -0
- pinescript_mcp/docs/writing_scripts/debugging.md +1943 -0
- pinescript_mcp/docs/writing_scripts/limitations.md +457 -0
- pinescript_mcp/docs/writing_scripts/profiling_and_optimization.md +2016 -0
- pinescript_mcp/docs/writing_scripts/publishing_scripts.md +327 -0
- pinescript_mcp/docs/writing_scripts/style_guide.md +245 -0
- pinescript_mcp/server.py +570 -0
- pinescript_mcp-0.1.0.dist-info/METADATA +121 -0
- pinescript_mcp-0.1.0.dist-info/RECORD +45 -0
- pinescript_mcp-0.1.0.dist-info/WHEEL +4 -0
- pinescript_mcp-0.1.0.dist-info/entry_points.txt +2 -0
- pinescript_mcp-0.1.0.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Pine Script v6 Documentation Manifest
|
|
2
|
+
|
|
3
|
+
**Purpose:** This file acts as a directory map for Large Language Models (LLMs). Use this manifest to determine which specific documentation files to retrieve based on the user's request.
|
|
4
|
+
|
|
5
|
+
**Protocol:** 1. Identify the user's intent (e.g., "Drawing a line", "Calculating RSI", "Backtesting").
|
|
6
|
+
2. Locate the relevant file path below.
|
|
7
|
+
3. Retrieve ONLY that file to conserve context window.
|
|
8
|
+
|
|
9
|
+
## 1. Syntax and Core Concepts
|
|
10
|
+
|
|
11
|
+
*Use these files when the user asks about language mechanics, execution flow, or type errors.*
|
|
12
|
+
|
|
13
|
+
* **`concepts/execution_model.md`**
|
|
14
|
+
* **Content:** How the script executes bar-by-bar, historical vs. real-time context, and the `var` keyword.
|
|
15
|
+
* **Keywords:** `barstate`, `history`, `realtime`, `calc_on_every_tick`, `var`, `varip`.
|
|
16
|
+
|
|
17
|
+
* **`concepts/timeframes.md`**
|
|
18
|
+
* **Content:** Handling multi-timeframe data and preventing repainting.
|
|
19
|
+
* **Keywords:** `request.security`, `timeframe.period`, `repainting`, `HTF`.
|
|
20
|
+
|
|
21
|
+
* **`concepts/colors_and_display.md`**
|
|
22
|
+
* **Content:** Defining colors, gradients, and transparency.
|
|
23
|
+
* **Keywords:** `color.new`, `color.from_gradient`, `bgcolor`.
|
|
24
|
+
|
|
25
|
+
* **`concepts/common_errors.md`**
|
|
26
|
+
* **Content:** Explanations for common runtime and compile-time errors.
|
|
27
|
+
* **Keywords:** "Series string", "Undeclared identifier", "max_bars_back".
|
|
28
|
+
|
|
29
|
+
* **`reference/pine_v6_cheatsheet.md`**
|
|
30
|
+
* **Content:** Compact reference of ALL valid v6 functions, namespaces, built-in variables, constants, and common pitfalls. Always include this file.
|
|
31
|
+
* **Keywords:** `cheatsheet`, `valid functions`, `namespaces`, `v6 reference`, `validation`.
|
|
32
|
+
|
|
33
|
+
## 2. API Reference (The Dictionary)
|
|
34
|
+
|
|
35
|
+
*Use these files for looking up built-in variables, constants, and keywords.*
|
|
36
|
+
|
|
37
|
+
* **`reference/variables.md`**
|
|
38
|
+
* **Content:** Built-in read-only variables regarding the bar, symbol, or status.
|
|
39
|
+
* **Keywords:** `open`, `high`, `low`, `close`, `volume`, `time`, `syminfo.ticker`, `timeframe.multiplier`, `bar_index`.
|
|
40
|
+
|
|
41
|
+
* **`reference/constants.md`**
|
|
42
|
+
* **Content:** Fixed constants used as arguments for functions.
|
|
43
|
+
* **Keywords:** `color.red`, `shape.triangle`, `plot.style_line`, `size.small`, `alert.freq_once_per_bar`.
|
|
44
|
+
|
|
45
|
+
* **`reference/types.md`**
|
|
46
|
+
* **Content:** Data type definitions and type-casting functions.
|
|
47
|
+
* **Keywords:** `int`, `float`, `bool`, `color`, `string`, `line`, `label`, `box`, `simple`, `series`, `input`.
|
|
48
|
+
|
|
49
|
+
* **`reference/keywords.md`**
|
|
50
|
+
* **Content:** Language keywords and control structures.
|
|
51
|
+
* **Keywords:** `if`, `else`, `switch`, `for`, `while`, `export`, `import`, `method`.
|
|
52
|
+
|
|
53
|
+
## 3. Function Reference (By Namespace)
|
|
54
|
+
|
|
55
|
+
*Use these files to find syntax for specific function calls.*
|
|
56
|
+
|
|
57
|
+
* **`reference/functions/ta.md` (Technical Analysis)**
|
|
58
|
+
* **Content:** Math for indicators and signal generation.
|
|
59
|
+
* **Keywords:** `ta.rsi`, `ta.sma`, `ta.ema`, `ta.macd`, `ta.crossover`, `ta.lowest`, `ta.highest`, `ta.pivot`.
|
|
60
|
+
|
|
61
|
+
* **`reference/functions/strategy.md` (Backtesting)**
|
|
62
|
+
* **Content:** Strategy testing engine, orders, and trade management.
|
|
63
|
+
* **Keywords:** `strategy.entry`, `strategy.close`, `strategy.exit`, `strategy.position_size`, `strategy.equity`, `strategy.risk`.
|
|
64
|
+
|
|
65
|
+
* **`reference/functions/request.md` (External Data)**
|
|
66
|
+
* **Content:** Requesting data from other symbols, financial data, or seeds.
|
|
67
|
+
* **Keywords:** `request.security`, `request.financial`, `request.seed`, `request.currency_rate`.
|
|
68
|
+
|
|
69
|
+
* **`reference/functions/drawing.md` (Visuals)**
|
|
70
|
+
* **Content:** Plotting data on the chart and drawing geometric shapes.
|
|
71
|
+
* **Keywords:** `plot`, `plotshape`, `plotchar`, `line.new`, `box.new`, `label.new`, `polyline.new`, `fill`.
|
|
72
|
+
|
|
73
|
+
* **`reference/functions/collections.md` (Arrays, Maps, Matrices)**
|
|
74
|
+
* **Content:** Advanced data structures for complex logic.
|
|
75
|
+
* **Keywords:** `array.new`, `array.push`, `matrix.new`, `matrix.mult`, `map.new`, `map.put`.
|
|
76
|
+
|
|
77
|
+
* **`reference/functions/general.md` (Math, Strings, Inputs)**
|
|
78
|
+
* **Content:** Core math, string manipulation, and user inputs.
|
|
79
|
+
* **Keywords:** `math.abs`, `math.round`, `str.tostring`, `str.format`, `input.int`, `input.bool`, `alert()`.
|
|
80
|
+
|
|
81
|
+
## 🧠Routing Logic for LLMs
|
|
82
|
+
|
|
83
|
+
* **IF** user asks "Write an RSI indicator":
|
|
84
|
+
* retrieve `reference/functions/ta.md` (for RSI math)
|
|
85
|
+
* retrieve `reference/functions/drawing.md` (for `plot` and `hline`)
|
|
86
|
+
|
|
87
|
+
* **IF** user asks "Create a moving average crossover strategy":
|
|
88
|
+
* retrieve `reference/functions/ta.md` (for `ta.crossover`)
|
|
89
|
+
* retrieve `reference/functions/strategy.md` (for `strategy.entry`)
|
|
90
|
+
|
|
91
|
+
* **IF** user asks "Draw a box around the high and low of the last 10 bars":
|
|
92
|
+
* retrieve `reference/functions/drawing.md` (for `box.new`)
|
|
93
|
+
* retrieve `reference/functions/ta.md` (for `ta.highest`, `ta.lowest`)
|
|
94
|
+
|
|
95
|
+
* **IF** user asks "Why is my variable resetting every bar?":
|
|
96
|
+
* retrieve `concepts/execution_model.md` (check `var` usage)
|