High-Performance JSON (v3.5.0)
A JSON library designed for LLMs, Autonomous Trading and Ultra-Low Latency.
When integrating AI models (GPT-4o, Claude 3.5, DeepSeek) into MetaTrader 5, the community's standard libraries failed on two critical points: Memory Allocation and Serialisation Latency. The excessive use of recursion and temporary strings turned the processing of AI responses (Function Calling) into bottlenecks that froze the terminal. The "pain" of losing ticks while the Garbage Collector cleared strings was what motivated this architecture.
Rewritten from scratch with an obsessive focus on performance:
Tests carried out on standard hardware (x64) with a complex payload of 50,000 nodes:
| Operation | (fast_json) | Legacy Lib (JAson) | Advantage |
|---|---|---|---|
| Parse | 137 ms | 1540 ms | 11.2x faster |
| Serialisation | 264 ms | 568 ms | 2.1x faster |
| Total (Roundtrip) | 401 ms | 2129 ms | 5.3x faster |
> Results verifiable via TestJsonBenchmark.mq5 script included in the package.
#include <fast_json.mqh>
void OnStart() {
string payload = GetOpenAIResponse(); // JSON massivo
CJson json;
if(json.Parse(payload)) {
// Acesso direto performance-critical (Zero-Copy)
string content = json["choices"][0]["message"]["content"].ToString();
// Exemplo: Extraindo uso de tokens
if(json.HasKey("usage")) {
long tokens = json["usage"]["total_tokens"].ToInt();
Print("Consumo: ", tokens);
}
} else {
// Debug preciso
int l, c;
json.GetErrorPos(l, c);
PrintFormat("Erro JSON na Linha %d, Coluna %d", l, c);
}
}
CJsonBuilder b;
b.Obj()
.Key("model").Val("gpt-4-turbo")
.Key("messages").Arr()
.Obj()
.Key("role").Val("user")
.Key("content").Val("Analyze EURUSD H1 trend")
.EndObj()
.EndArr()
.Key("temperature").Val(0.7)
.EndObj();
string body = b.Serialization(); // Serialização ultra-rápida
Developed by Jonathan Pereira as the core infrastructure of the AI-Toolkit framework.
Translated from Portuguese by MetaQuotes Ltd.
Original code: /pt/code/68596
VR Rsi Robot is a multi-timeframe trading strategy
Just two timeframes — H1 and D1 — work synchronously to filter out the noise and capture only strong RSI reversals from overbought and oversold zones. No random entries, only a clear confirmation of the direction from the "big brother."
ExMachina SupplyDemand Indicator
ExMachina Supply & Demand Zones is a professional indicator that automatically detects supply and demand zones on any chart using impulse-based detection with ATR filtering. Version 2.0 introduces multi-candle impulse detection, full range measurement, zone merging, touch tracking, proximity alerts, and an ExMachina dark theme that transforms your chart into a professional trading workspace.
OHLCMTF Scalper EA - Multi-Timeframe Price Action
A strict Multi-Timeframe Price Action Expert Advisor that trades based on precise OHLC conditions across different timeframes simultaneously. It features pending order entries, role reversals, and dynamic risk management without using any lagging indicators.
NeuroPro Converter
NeuroPro Verbalisation Converter for MQL5