LLmAgentsBasicTools/README.md

112 lines
3.5 KiB
Markdown
Raw Permalink Normal View History

2026-07-13 16:01:33 -05:00
<p align="center">
<img src="https://img.shields.io/badge/Language-MQL5-1B6CA8?style=flat-square"/>
<img src="https://img.shields.io/badge/Platform-MetaTrader%205-0D1B2A?style=flat-square"/>
<img src="https://img.shields.io/badge/Author-nique__372-C9D6DF?style=flat-square&logoColor=white"/>
<img src="https://img.shields.io/badge/MQL5.com-nique__372-1B6CA8?style=flat-square"/>
<a href="./LICENSE">
<img src="https://img.shields.io/badge/License-Nique%26Leo%20NL--NC-yellow.svg"/>
</a>
</p>
2026-07-13 16:59:30 +00:00
2026-07-13 16:01:33 -05:00
<p align="center">
A collection of basic and reusable <code>CLLmTool</code> implementations for the TSN/LLM ecosystem. It serves as a foundation template that any project (dashboards, Telegram bots, MCP servers, etc.) can include to instantly provide its LLM agent with generic MT5 utilities without having to rewrite them every time.
</p>
---
## Main Features
- **get_time:** Returns the GMT time, broker server time, local machine time, or the time of the latest tick for a symbol.
- **account_info:** Returns any `ENUM_ACCOUNT_INFO_DOUBLE`, `ENUM_ACCOUNT_INFO_INTEGER`, or `ENUM_ACCOUNT_INFO_STRING` property of the active account.
- **terminal_info:** Returns any `ENUM_TERMINAL_INFO_DOUBLE`, `ENUM_TERMINAL_INFO_INTEGER`, or `ENUM_TERMINAL_INFO_STRING` property of the terminal.
- **get_err_description:** Converts an MT5 error code into its human-readable description.
- **get_expert_logs:** Returns the latest lines from the Expert Advisor/terminal log.
All tools are synchronous (they resolve directly through the native MT5 API, without event delegation or waiting for `ChartEvent`) and return responses in the format:
```json
{"ok":true,"result":...}
```
or
```json
{"ok":false,"error":"..."}
```
---
## ⚠️ License Activation (Required)
To use these basic tools with `CToolsManager`, the **LLmAgentsByLeoFinal EX5 Library** is required.
### How to activate
1. Purchase **LLmAgentsByLeoFinal**:
- https://thebotplace.com/bot/llmangentsbyleosdk
2. Retrieve your **TBP ID** from your account:
- https://thebotplace.com/profile
---
## Installation
```bash
cd "C:\Users\YOUR_USER\AppData\Roaming\MetaQuotes\Terminal\YOUR_ID\MQL5\Shared Projects"
tsndep install "https://forge.mql5.io/nique_372/LLmAgentsBasicTools.git"
```
- Requires the `tsndep` package, available on [PyPI](https://pypi.org/project/tsndep). It automatically downloads and installs all declared dependencies.
- If any dependency is private or commercial, installation for that package will fail. Check [dependencies.json](./dependencies.json) and contact me to request access.
---
## Quick Start
**1. Include the library in your project:**
```mql5
#include <TSN\\LLMBTools\\Main.mqh>
```
**2. Register the basic tools in your `CLLmToolsManager`:**
```mql5
// Project-specific tools
m_tools.AddItemFast(new CMyCustomTool(...));
//---
CJsonParser* parser = m_tools.JsonParser();
parser.Assing(g_toos_json_shema_myproject); // your own tools.json (via #resource)
parser.CorrectPadingForSwar();
if(!m_tools.Init())
{
LogError("Failed to initialize tools", FUNCION_ACTUAL);
...
}
// Registers get_time, account_info, terminal_info,
// get_err_description and get_expert_logs
if(!CLlmBasictToolsByLeo::Load(m_tools))
{
LogError("Failed to load basic tools", FUNCION_ACTUAL);
...
}
```
---
## Contact
- **Platform:** https://www.mql5.com/en/users/nique_372
- **Profile:** https://www.mql5.com/en/users/nique_372
---
## License
**[Read Full License](./LICENSE)**
By downloading or using this repository, you agree to the terms of the license.