PMTS技术白皮书 — AI交易架构
完整的技术白皮书,记录专注于XAUUSD的机构级AI协调交易系统的架构、算法和实施。
发现PMTS的机构价值
访问专业模块化交易系统的完整官方估值报告。详细的财务分析、风险评估方法和基于经验证历史绩效的预期回报。
技术与绩效审计报告
访问完整的独立审计报告,包括代码审查、安全评估和PMTS算法系统执行的所有820+笔交易的验证。
摘要
专业模块化交易系统(PMTS)代表了自动化交易的范式转变,将机构级风险管理与尖端人工智能协调相结合。本白皮书全面介绍了PMTS的架构技术概述,重点关注其模块化设计理念、多层验证协议以及针对黄金(XAUUSD)交易的专业优化。
与依赖固定规则系统的传统EA不同,PMTS实施了一个动态汇合评分机制,可实时适应不断变化的市场条件。该系统跨多个时间框架处理超过150个技术指标,应用加权分析生成高概率交易信号,并内置风险控制以保护资本同时最大化风险调整回报。
PMTS的多层交叉验证系统与单一指标策略相比减少高达85%的误报,同时将执行延迟保持在50毫秒以下。
简介
黄金市场(XAUUSD)对自动化交易系统提出了独特的挑战。日交易量超过1300亿美元,价格变动受宏观经济因素、地缘政治事件和机构定位的影响,成功的黄金交易需要超越简单技术指标的复杂分析。
PMTS由Elysium Media FZCO(迪拜)开发,以应对这些挑战,实施了一种模块化架构,将关注点分离到专门的组件:分析、信号生成、订单管理、风险控制和头寸管理。这种分离使每个子系统能够独立优化,同时通过中央协调层保持一致的运作。
设计目标
- 资本保护:通过多层保护系统优先考虑风险管理而非利润最大化
- 自适应响应:根据当前市场波动和交易时段动态调整参数
- 机构级执行:实施专业订单管理,具有滑点控制和保证金验证
- 透明度:提供全面的日志记录和实时绩效指标
- 可扩展性:支持多账户管理,具有一致的风险参数
关键特性
AI协调
中央AI引擎协调7个专业分析模块,在信号验证前需要多层共识。
汇合评分
动态评分系统对多个指标、时段时间和波动性进行加权,生成0-100置信度评分。
风险控制
多层保护,包括每日亏损限制、最大回撤上限、保证金监控和自动仓位调整。
黄金专业化
专业的XAUUSD优化,包括基于时段的交易、美元相关性分析和黄金特定的手数调整。
缩放系统
亏损后的智能手数缩放,具有自动恢复目标和可配置的风险升级限制。
可视化仪表盘
实时图表面板显示时段框、信号箭头、待定水平和全面的交易统计。
系统架构
PMTS采用分层模块化架构,每个组件作为具有定义接口的独立单元运行。主Expert Advisor(PMTS-GOLD-V51.mq5)作为入口点,协调16个专业模块,分为6个功能类别。
模块组织
| 类别 | 模块 | 职责 |
|---|---|---|
| Config | InputParameters.mqh | 用户可配置的交易参数和设置 |
| Analysis | Indicators.mqh | 技术指标初始化和管理 |
| Analysis | GoldAnalysis.mqh | XAUUSD特定的时段和相关性分析 |
| Trading | SignalEngine.mqh | 汇合评分和信号生成 |
| Trading | OrderManager.mqh | 订单下达和挂单管理 |
| Risk | MoneyManager.mqh | 手数计算和资金分配 |
| Risk | RiskControl.mqh | 限制执行和混合止损 |
| Risk | ScalingManager.mqh | 亏损恢复缩放和手数递进 |
模块化设计理念
模块化架构遵循软件工程最佳实践,具有清晰的关注点分离。每个.mqh头文件封装一个特定领域,对其他模块的依赖最小。这种设计实现了:
- 独立测试:每个模块可以在集成前单独验证
- 选择性优化:指标参数可以在不影响风险管理的情况下调整
- 易于维护:错误修复和改进局限于特定文件
- 功能开关:Williams %R或MACD等组件可以通过输入参数启用/禁用
信号引擎
信号引擎是PMTS的核心决策组件。它实现了一个汇合评分系统,该系统聚合来自多个指标和市场条件的信号,以产生单一的置信度分数(0-100)。只有超过60分阈值的信号才能进入订单下达。
汇合评分算法
汇合计算根据指标对齐和市场背景分配加权分数。基础评分系统评估主要条件,而次要因素对最终分数应用奖励或惩罚。
| 组件 | 分数 | 条件 |
|---|---|---|
| TEMA Falling | +30 | TEMA[0] < TEMA[1] < TEMA[2] |
| SuperTrend Lateral | +30 | 价格在SuperTrend线200点以内 |
| Williams %R Neutral | +20 | WPR在-90到-25之间(非极端) |
| EMA Alignment | +15 | EMA18 > EMA30 > EMA290 |
| MACD Bullish | +10 | MACD线 > 信号线 |
| Session Overlap | +15 | 伦敦/纽约重叠时段(13:00-16:00 GMT) |
动态惩罚
最终分数根据市场条件通过乘数因子调整:
- 美元强势:当美元指数显示强势时分数乘以0.8(与黄金负相关)
- 低波动率:当ATR比率 < 0.8时分数乘以0.8
- 高波动率:当ATR比率 > 2.5时分数乘以0.3/GoldVolatilityMultiplier
- 新闻临近:当高影响新闻在30分钟内时分数乘以0.5
技术指标
PMTS使用一组精选的技术指标,每个都针对黄金独特的价格行为进行了优化。所有指标在H1时间框架上运行,以平衡信号质量和执行频率。
| 指标 | 优化参数 | 用途 |
|---|---|---|
| TEMA | Period: 16 | 具有减少滞后的主要趋势方向 |
| SuperTrend | Period: 23, Mult: 2.0 | 趋势延续和反转检测 |
| ATR | Period: 50 | 止损计算和波动率测量 |
| Williams %R | Period: 17 | 超买/超卖条件和背离 |
| EMA Fast/Slow/Trend | 18 / 30 / 290 | 长期趋势偏向 |
| MACD | 17 / 27 / 13 | 动量确认过滤器 |
这些参数是通过对5年XAUUSD数据(2019-2024)进行前进优化得出的,特别强调2020年后的波动率制度。
资金管理
PMTS实现了一个复杂的资金管理系统,根据账户净值、当前风险参数和市场波动率自动计算仓位大小。该系统支持固定手数和基于风险的自动调整。
默认风险参数
| 参数 | 默认值 | 描述 |
|---|---|---|
| RiskPercent | 1.0% | 每笔交易的最大风险 |
| MaxAccountRisk | 20.0% | 交易停止前的最大总账户回撤 |
| MaxDailyTrades | 5 | 每天最大交易次数 |
| GoldPipValueAdjustment | 12.0 | 用于规范化黄金手数的除数 |
Position Sizing Algorithm (MQL5 Implementation)
The following MQL5 code demonstrates how PMTS calculates position sizes using fixed percentage risk - NOT Martingale progression. Each trade risks a constant percentage of account equity regardless of previous outcomes.
//+------------------------------------------------------------------+
//| Calculate lot size based on FIXED PERCENTAGE RISK |
//| This is NOT Martingale - risk % is constant per trade |
//+------------------------------------------------------------------+
double CalculateLotSize(double stopLossPips)
{
// Get current account equity (NOT balance, to account for floating P/L)
double equity = AccountInfoDouble(ACCOUNT_EQUITY);
// Fixed risk percentage (default 1.0%, max 2.0%)
double riskPercent = MathMin(g_RiskPercent, 2.0);
// Calculate dollar amount to risk
double riskAmount = equity * (riskPercent / 100.0);
// Get pip value for current symbol
double tickValue = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
double pointValue = tickValue / tickSize * _Point;
// Calculate lot size: Risk Amount / (Stop Loss in Points * Point Value)
double lotSize = riskAmount / (stopLossPips * 10 * pointValue);
// Apply gold-specific adjustment (higher pip value)
if(StringFind(_Symbol, "XAU") >= 0)
lotSize /= g_GoldPipValueAdjustment; // Default: 12.0
// Apply loss reduction (OPPOSITE of Martingale - reduce after loss)
if(g_ConsecutiveLosses > 0 && g_ReduceAfterLoss)
lotSize *= MathPow(0.75, g_ConsecutiveLosses); // Reduce 25% per loss
// Normalize to broker's lot step and enforce min/max limits
double minLot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MIN);
double maxLot = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_MAX);
double lotStep = SymbolInfoDouble(_Symbol, SYMBOL_VOLUME_STEP);
lotSize = MathMax(minLot, MathMin(maxLot, lotSize));
lotSize = MathRound(lotSize / lotStep) * lotStep;
return NormalizeDouble(lotSize, 2);
}
- Fixed Risk Per Trade: Risk percentage (1-2%) remains constant regardless of previous outcomes
- Position Size DECREASES After Losses: Line 26-27 shows 25% reduction per consecutive loss (opposite of Martingale)
- Equity-Based Calculation: Lot size is derived from current equity, automatically adjusting to account changes
- Always Uses Stop-Loss: Every trade has a defined risk level through mandatory stop-loss
3-Tier Stop-Loss System (MQL5 Implementation)
PMTS implements a three-tier protection system that prevents catastrophic losses at trade, daily, and account levels.
//+------------------------------------------------------------------+
//| Three-Tier Risk Protection System |
//| Provides layered protection at trade, daily, and account levels |
//+------------------------------------------------------------------+
bool CheckRiskGuard()
{
double equity = AccountInfoDouble(ACCOUNT_EQUITY);
double balance = AccountInfoDouble(ACCOUNT_BALANCE);
//--- TIER 1: Account-Level Circuit Breaker (15% max drawdown)
double accountDrawdown = ((g_PeakEquity - equity) / g_PeakEquity) * 100;
if(accountDrawdown >= g_MaxAccountDrawdown) // Default: 15%
{
CloseAllPositions("CIRCUIT BREAKER: Max account drawdown reached");
g_TradingHalted = true;
return false;
}
//--- TIER 2: Daily Loss Limit (5% daily max)
double dailyPL = CalculateDailyPL();
double dailyDrawdown = (MathAbs(dailyPL) / balance) * 100;
if(dailyPL < 0 && dailyDrawdown >= g_MaxDailyLoss) // Default: 5%
{
g_DailyTradingPaused = true;
Alert("Daily loss limit reached. Trading paused until next day.");
return false;
}
//--- TIER 3: Per-Trade Stop-Loss (ATR-based)
// Stop-loss is ALWAYS set on every trade, calculated as:
// SL Distance = ATR(50) * 2.0 (default multiplier)
// This ensures no trade can lose more than the calculated risk amount
// Update peak equity for drawdown tracking
if(equity > g_PeakEquity)
g_PeakEquity = equity;
return true; // All guards passed, trading allowed
}
//+------------------------------------------------------------------+
//| Calculate ATR-based Stop-Loss (ALWAYS required) |
//+------------------------------------------------------------------+
double CalculateStopLoss(ENUM_ORDER_TYPE orderType, double entryPrice)
{
// Get ATR value (50-period by default)
double atr = iATR(_Symbol, PERIOD_H1, g_ATRPeriod); // Default: 50
// Calculate SL distance (2x ATR for gold volatility)
double slDistance = atr * g_ATRMultiplier; // Default: 2.0
// Apply SL in correct direction
if(orderType == ORDER_TYPE_BUY)
return entryPrice - slDistance;
else
return entryPrice + slDistance;
}
PMTS vs. Martingale Comparison
| Aspect | Martingale (Dangerous) | PMTS (Fixed Risk) |
|---|---|---|
| After Loss | DOUBLE position size | REDUCE position size by 25% |
| Stop-Loss | Often none (wait for reversal) | ALWAYS required (ATR-based) |
| Maximum Risk | Unlimited (can wipe account) | Capped at 2% per trade, 15% total |
| Position Growth | Exponential (2x, 4x, 8x, 16x...) | Linear, proportional to equity |
| Consecutive Losses | 6-7 losses = total account loss | Survives 50+ consecutive losses |
| Circuit Breaker | None | 3-tier protection (trade/daily/account) |
混合保护系统
混合保护系统是一种多级止损管理机制,随着仓位有利移动而逐步锁定利润。与简单的追踪止损不同,该系统实现了在特定利润阈值激活的离散保护级别。
| 级别 | 触发(点) | 保护 | 操作 |
|---|---|---|---|
| Level 1 | +30 | Breakeven | 将止损移至入场价+0.2点缓冲 |
| Level 2 | +50 | +20 pips | 锁定20点利润 |
| Level 3 | +80 | +40 pips | 锁定40点利润 |
| Level 4 | +120 | Trailing 50 | 激活50点距离的追踪止损 |
混合保护系统只将止损向有利方向移动(买入仓位向上)。一旦建立保护,它永远不会降低。
缩放系统
可选的缩放系统实现了一种受控的手数递进策略,旨在从连续亏损中恢复。启用后,它在每次亏损后将手数翻倍,最多3个级别(2x、4x、8x),然后如果亏损继续则扩大止损和止盈距离。
手数递进
Loss 0: 0.01 lots (normal trading) Loss 1: 0.02 lots (x2 multiplier) Loss 2: 0.04 lots (x4 multiplier) Loss 3: 0.08 lots (x8 multiplier - max) Loss 4+: 0.08 lots + expanded TP/SL
缩放系统显著增加风险敞口。默认情况下它是禁用的(UseScalingSystem = false),只应由了解马丁格尔式递进影响的经验丰富的交易者启用。
XAUUSD专业化
PMTS专门为黄金交易(XAUUSD)设计和优化。该系统拒绝在任何其他品种上初始化,确保所有参数和逻辑都在其预期的上下文中应用。
黄金市场特征
- 更高的点值:黄金通常具有主要外汇对10倍的点值,需要调整手数大小
- 时段敏感性:价格行为在亚洲、伦敦和纽约时段之间显著变化
- 美元相关性:与美元强度有强烈的负相关
- 新闻反应性:对FOMC、NFP和通胀数据发布高度敏感
黄金特定调整
| 方面 | 调整 |
|---|---|
| 手数计算 | 除以GoldPipValueAdjustment(12.0)以规范化风险 |
| 波动率阈值 | 更宽的范围(0.8-2.5),带有额外的1.7x惩罚乘数 |
| 点差限制 | 执行的最大点差设置为5.0点 |
| 保证金缓冲 | 下单前需要50%额外保证金 |
基于时段的交易
黄金在全球交易时段中表现出独特的行为模式。PMTS持续监控当前时段,并对信号评分和风险参数应用适当的乘数。
| 时段 | 时间(GMT) | 乘数 | 评分奖励 |
|---|---|---|---|
| Asian | 00:00 - 08:00 | 0.7x | -10 |
| London | 08:00 - 16:00 | 1.2x | +10 |
| London/NY Overlap | 13:00 - 16:00 | 1.43x | +15 |
| New York | 13:00 - 20:00 | 1.3x | +10 |
| Late NY | 20:00 - 24:00 | 0.8x | +5 |
API端点
PMTS包含一个REST API,提供实时市场分析和交易信号。该API聚合来自多个来源的数据,包括技术指标、基本面事件和情绪分析。
GET /api/analysis/{symbol}
GET /api/analysis/{symbol}/signal.json
GET /api/dashboard/accounts
GET /api/dashboard/sync
Supported: XAUUSD, EURUSD, GBPJPY, USDJPY, BTCUSD, ETHUSD...
信号JSON格式
{
"symbol": "XAUUSD",
"signal": "BUY",
"confidence": 72,
"entry_price": 2645.50,
"stop_loss": 2632.80,
"take_profit_1": 2658.20,
"risk_reward": "1.5:1"
}
回测结果
使用MetaTrader 5的策略测试器进行了全面的回测,使用来自多个流动性提供商的逐笔数据。以下结果代表通过前进分析验证的优化参数集。
过去的表现不能保证未来的结果。回测结果可能无法反映实际交易条件,包括滑点、重新报价和不同的点差条件。
绩效指标(2019-2024)
| 指标 | 值 | 行业基准 |
|---|---|---|
| 年化收益 | 47.3% | 15-25% |
| 夏普比率 | 1.89 | > 1.0 |
| 胜率 | 64.2% | 50-60% |
| 盈利因子 | 1.87 | > 1.5 |
| 最大回撤 | 12.8% | < 20% |
| 恢复因子 | 4.2 | > 3.0 |
AI Analysis Engine Overview
The PMTS AI Analysis Engine represents the cutting-edge of institutional-grade market analysis. Unlike basic systems that rely on a handful of indicators with synthetic data, our engine processes real-time data from multiple professional sources, combining Technical, Fundamental, and Sentiment analysis through an intelligent orchestration layer that mimics how professional institutional traders approach the market.
The system operates with a conservative, high-quality signal approach. Every trading signal must pass through multiple validation filters before being presented to the user. This ensures that only high-probability setups with strong confluences across multiple analysis dimensions are recommended.
The AI Engine processes 15+ technical indicators across 4 timeframes, integrates real-time news sentiment, macroeconomic data from FRED, Fear & Greed indices, and whale activity tracking to generate signals with calculated confidence scores ranging from 0-100%.
System Architecture
| Component | Function | Output |
|---|---|---|
| TechnicalAnalysis.php | Multi-timeframe indicator analysis, market structure detection, Fibonacci levels | Score 0-100, Signal direction |
| FundamentalAnalysis.php | Economic calendar, real-time news with NLP sentiment, macro data integration | Score 0-100, Event warnings |
| SentimentAnalysis.php | Fear & Greed Index, social sentiment, whale tracking, COT positioning | Score 0-100, Market mood |
| DataSources.php | API wrapper for Binance, Finnhub, FRED, Alternative.me, Yahoo Finance, and more | Real-time market data |
| Analysis.php | Orchestrates all modules, applies dynamic weights, calculates final confidence | Final signal + confidence |
Multi-Timeframe Analysis
Professional traders never rely on a single timeframe. The AI Engine simultaneously analyzes 4 timeframes to ensure confluence and validate trade setups. Each timeframe serves a specific purpose in the analysis hierarchy, with weighted contributions to the final signal.
| Timeframe | Weight | Purpose |
|---|---|---|
| 1H (Hourly) | 20% | Precise entry timing and immediate momentum detection |
| 4H (4-Hour) | 30% | Intermediate trend confirmation and pattern validation |
| 1D (Daily) | 35% | Primary market direction and key support/resistance levels |
| 1W (Weekly) | 15% | Macro bias and long-term trend context |
Confluence Requirements
The system requires minimum confluence thresholds before generating actionable signals:
- STRONG Signal: 4/4 timeframes aligned in the same direction - highest confidence trades
- GOOD Signal: 3/4 timeframes aligned (weekly may differ) - high probability setups
- WEAK Signal: 2/4 timeframes aligned - lower confidence, requires additional confirmation
- NEUTRAL: Less than 2 timeframes aligned - no signal generated, market is choppy
Advanced Technical Indicators
Beyond standard indicators, the AI Engine implements institutional-grade technical analysis tools that provide deeper market insight:
Ichimoku Cloud (Full Implementation)
The complete Ichimoku Kinko Hyo system provides 5 key components for comprehensive trend analysis:
| Component | Calculation | Signal Interpretation |
|---|---|---|
| Tenkan-sen | (9-period High + Low) / 2 | Conversion line - short-term momentum |
| Kijun-sen | (26-period High + Low) / 2 | Base line - medium-term trend direction |
| Senkou Span A | (Tenkan + Kijun) / 2, plotted 26 ahead | Leading span A - first cloud boundary |
| Senkou Span B | (52-period High + Low) / 2, plotted 26 ahead | Leading span B - second cloud boundary |
| Chikou Span | Close price plotted 26 periods back | Lagging span - trend confirmation |
Additional Advanced Indicators
| Indicator | Description |
|---|---|
| TEMA (Triple EMA) | Reduces lag significantly compared to standard EMA, providing faster trend detection |
| RSI Divergence Detection | Automatically detects bullish and bearish divergences for reversal signals |
| Bollinger Bands | Volatility-based bands identifying overbought/oversold and squeeze conditions |
| Stochastic Oscillator | Momentum indicator identifying extreme zones and potential reversals |
| ADX (Average Directional Index) | Measures trend strength (0-100), used for dynamic weight adjustments |
| Pivot Points | Daily and weekly pivot levels with R1-R3 and S1-S3 support/resistance zones |
| Fibonacci Retracements | Auto-calculated levels at 0.236, 0.382, 0.5, 0.618, 0.786 from swing points |
Market Structure Detection
The engine automatically identifies market structure patterns that professional traders use:
- Higher Highs / Higher Lows (HH/HL): Confirmed uptrend structure
- Lower Highs / Lower Lows (LH/LL): Confirmed downtrend structure
- Break of Structure (BOS): Trend continuation confirmation
- Change of Character (ChoCH): Potential trend reversal signal
Real-Time Data Sources
The AI Engine integrates with multiple professional data sources to ensure accuracy and reliability. All price data is real-time, not synthetic or simulated.
| Category | Source | Data Provided |
|---|---|---|
| Crypto Prices | Binance API | Real-time candles, multi-timeframe OHLCV |
| Forex/Stocks | Finnhub + Yahoo Finance | Real-time quotes, historical data |
| Gold (XAUUSD) | Swissquote + Forex APIs | Live spot prices with tight spreads |
| Fear & Greed Index | Alternative.me (Official) | Crypto fear/greed 0-100, updated daily |
| Macro Economics | FRED API (Federal Reserve) | Fed Funds Rate, 10Y Treasury, Inflation |
| News Sentiment | Finnhub + Finlight.me | Real-time news with NLP sentiment scoring |
| Whale Tracking | ClankApp | Large crypto transactions monitoring |
| COT Reports | CFTC Public Data | Institutional positioning (weekly) |
| Options Flow | VIX-based Estimation | Put/Call ratio for sentiment analysis |
| Social Sentiment | Twitter/X + Reddit | Gold-specific social sentiment from financial communities |
All data sources are validated in real-time. If any API fails or returns invalid data, the system automatically falls back to secondary sources or synthetic estimation with a confidence penalty applied to the final score.
Confidence Calculation System
The confidence score (0-100%) is calculated through a sophisticated bonus/penalty system that evaluates multiple market factors. This score directly influences whether a signal is presented and how it should be weighted in trading decisions.
Confidence Bonuses (+)
| Factor | Bonus | Condition |
|---|---|---|
| Timeframe Confluence | +20% | 4/4 timeframes aligned |
| Indicator Agreement | +15% | 80%+ indicators confirm direction |
| Real Data Quality | +10% | All APIs returning real data |
| No Disruptive Events | +10% | No high-impact news in 4 hours |
| Extreme Sentiment Confirms | +15% | Fear/Greed at extremes aligning with signal |
| Clear Market Structure | +15% | HH/HL or LH/LL pattern confirmed |
| Fibonacci Zone | +15% | Price at key Fib level (0.618, 0.5, 0.382) |
| COT Confirms | +10% | Institutional positioning aligns |
| Whale Activity | +10% | Bullish whale activity for BUY signals |
Confidence Penalties (-)
| Factor | Penalty | Condition |
|---|---|---|
| Synthetic Data Used | -20% | Real API unavailable, using estimates |
| Counter-Trend Trade | -15% | Signal against daily trend |
| Upcoming High-Impact Event | -10% | FOMC, NFP, CPI within 4 hours |
| Indicator Conflict | -10% | Significant indicator disagreement |
| Extreme Sentiment Against | -15% | Fear/Greed against signal direction |
| High Volatility | -10% | VIX > 25 or extreme ATR |
| Low TF Confluence | -15% | Less than 3 timeframes aligned |
Dynamic Weight System
The base analysis weights (Technical: 40%, Fundamental: 35%, Sentiment: 25%) are dynamically adjusted based on market conditions:
- High VIX (>25): Technical weight +10% (volatility favors technical analysis)
- Strong Trend (ADX>25): Technical weight +10% (trending markets are more technical)
- Pre-Event (4h): Fundamental weight +15% (macro events dominate)
- Extreme Sentiment: Sentiment weight +10% (extreme readings are predictive)
- COT Extreme: Sentiment weight +5% (institutional positioning matters)
Intelligent Risk Management
The AI Engine calculates precise entry, stop-loss, and take-profit levels based on market structure rather than arbitrary fixed distances. This approach ensures that stops are placed at logical levels where the trade thesis would be invalidated.
Structure-Based Stop Loss
Stop-loss placement follows a priority hierarchy:
- SWING_LOW/HIGH: Below last swing low (BUY) or above last swing high (SELL) - most reliable
- FIBONACCI: Below/above key Fibonacci level (0.786 or 0.618) - strong confluence
- PIVOT: At nearby daily pivot support/resistance level
- ATR_BASED: Fallback calculation at 1.5x ATR from entry - when structure unclear
Multiple Take Profit Levels
The system provides three take-profit levels with recommended position allocation:
| Level | Target Calculation | Allocation | Typical R:R |
|---|---|---|---|
| TP1 | Next resistance/support or 1.5x risk distance | 50% | 1.5:1 |
| TP2 | Fibonacci extension or 2.5x risk distance | 30% | 2.5:1 |
| TP3 | Major structure level or 4x risk distance | 20% | 4:1 |
The multi-TP approach allows traders to secure profits progressively while letting winners run. The 50/30/20 allocation ensures a portion of profit is locked in early while maintaining exposure for larger moves.
Signal Validation Filters
Before any signal is presented, it must pass through these validation filters (Conservative Mode):
- At least 3 of 4 timeframes must align with signal direction
- Daily trend must not contradict the signal
- No HIGH impact economic events in the next 4 hours
- At least 2 of 3 analysis types (Technical/Fundamental/Sentiment) must agree
- Market structure must confirm (HH/HL for BUY, LH/LL for SELL)
- RSI must not be at extremes against the signal (no BUY at RSI>80)
- Calculated confidence must be >= 55%
If a signal fails validation filters, the system will either downgrade it to WEAK signal with a warning, or return NEUTRAL with an explanation of why no trade is recommended.
AI Master Intelligence (GPT)
The crown jewel of PMTS is the AI Master Intelligence system, powered by OpenAI's GPT model. This advanced neural network acts as the final decision-maker, synthesizing all analysis layers into a coherent, actionable trading recommendation with unprecedented precision and contextual understanding.
The AI Master processes technical indicators, fundamental data, sentiment metrics, and reversal signals through a sophisticated prompt engineering system, generating human-readable summaries with institutional-grade precision and multilingual support (English/Spanish).
Multi-Layer Analysis Architecture
The AI Master receives pre-processed data from five specialized analysis modules, each contributing unique market insights:
Intelligent Output Generation
The AI Master generates comprehensive analysis summaries that include:
- Market Context: Current market conditions, key levels, and dominant trends
- Signal Justification: Clear reasoning for the BUY/SELL/NEUTRAL recommendation
- Risk Assessment: Potential risks and factors that could invalidate the signal
- Confidence Breakdown: Contribution of each analysis layer to the final score
- Actionable Levels: Precise entry, stop-loss, and multiple take-profit levels
Multilingual Intelligence
The AI Master supports full internationalization, generating complete analysis summaries in the user's preferred language. The system currently supports English and Spanish, with the language parameter passed through the entire analysis chain to ensure consistent localization.
| Feature | Implementation |
|---|---|
| Language Detection | API parameter (?lang=en or ?lang=es) with localStorage persistence |
| AI Response | GPT generates full analysis in requested language natively |
| Cache System | Language-aware caching with separate cache entries per language |
| UI Integration | Seamless language switching without page reload |
News Impact Power System
Not all news is created equal. A headline about a minor central bank comment differs vastly from an unexpected Fed rate decision or major economic data surprise. The News Impact Power System quantifies the market-moving potential of each news article on a 0-100% scale, enabling the AI to differentiate between routine market noise and truly significant events.
Impact Power Scale (0-100%)
| Category | Range | Examples |
|---|---|---|
| CRITICAL | 85-100% | Emergency Fed rate decisions, major banking crises, sovereign debt defaults, unexpected central bank interventions |
| HIGH | 65-84% | FOMC rate decisions (unexpected), major earnings misses, geopolitical escalations |
| MEDIUM | 40-64% | Economic data releases (CPI, NFP), scheduled rate decisions (as expected), earnings in-line |
| LOW | 20-39% | Analyst upgrades/downgrades, minor policy comments, routine economic indicators |
| MINIMAL | 0-19% | Market commentary, opinion pieces, routine corporate announcements |
Weighted Score Calculation
Each news article generates a weighted score combining direction, impact power, and confidence:
weighted_score = direction × impact_power × confidence Where: direction = +1 (BULLISH), -1 (BEARISH), 0 (NEUTRAL) impact_power = 0 to 100 (percentage of market-moving potential) confidence = 0 to 1 (AI confidence in sentiment analysis) Examples: "Fed announces surprise 50bp rate cut" → BULLISH for Gold direction = +1, impact_power = 78%, confidence = 0.92 weighted_score = 1 × 78 × 0.92 = +71.76 (strongly bullish) "US CPI comes in higher than expected at 3.4%" → BEARISH for Gold (short-term) direction = -1, impact_power = 55%, confidence = 0.85 weighted_score = -1 × 55 × 0.85 = -46.75 (moderately bearish) "ECB holds rates steady as expected" → NEUTRAL direction = 0, impact_power = 35%, confidence = 0.90 weighted_score = 0 × 35 × 0.90 = 0 (no directional impact)
Net Weighted Score
The system aggregates all news articles into a single Net Weighted Score, providing an overall market sentiment reading:
- Strong Bullish (>50): Multiple high-impact bullish news dominate
- Moderate Bullish (20-50): Bullish bias with mixed signals
- Neutral (-20 to 20): Balanced news flow or low-impact news only
- Moderate Bearish (-50 to -20): Bearish bias with mixed signals
- Strong Bearish (<-50): Multiple high-impact bearish news dominate
A minor Fed comment about "watching inflation closely" might score 25% impact power, while breaking news of an emergency rate cut would score 90%+. This differentiation ensures the AI responds proportionally to the true significance of market events.
Reversal Detection System
Trend reversals represent the highest-reward trading opportunities in financial markets. The PMTS Reversal Detection System employs a multi-factor confluence analysis to identify potential trend reversals before they occur, combining price action, momentum, volume, and pattern recognition.
Reversal Detection Factors
| Detection Factor | Weight | Description |
|---|---|---|
| RSI Divergence | 25% | Price makes new high/low while RSI fails to confirm - classic reversal signal |
| MACD Crossover | 20% | Signal line crossovers at extreme levels indicate momentum shift |
| Bollinger Band Extreme | 15% | Price touches or exceeds outer bands suggesting overextension |
| Stochastic Crossover | 15% | %K/%D crossover in overbought/oversold zones |
| Candlestick Patterns | 15% | Engulfing, hammer, doji, and other reversal candlestick formations |
| Volume Analysis | 10% | Unusual volume spikes often precede major reversals |
Reversal Probability Calculation
The system calculates a reversal probability percentage (0-100%) based on the confluence of detected factors:
- 75-100%: HIGH reversal probability - Multiple strong signals confirm potential reversal
- 50-74%: MODERATE probability - Some reversal signals present, caution advised
- 25-49%: LOW probability - Few reversal signals, trend likely to continue
- 0-24%: MINIMAL probability - No significant reversal signals detected
Integration with AI Master
Reversal detection data feeds directly into the AI Master for final synthesis:
- Signal Modification: High reversal probability can upgrade NEUTRAL to cautionary signal
- Risk Adjustment: Reversal warnings trigger tighter stop-loss recommendations
- Confidence Impact: Conflicting trend/reversal signals reduce overall confidence score
- Summary Inclusion: AI Master explicitly mentions reversal potential in analysis summary
Reversal detection is inherently predictive and carries higher risk than trend-following signals. The system provides reversal probabilities as additional context, not as standalone trading signals. Always wait for confirmation before acting on reversal indications.