Capital Asset Pricing Model Trend EA Inputs and Value Reference

Capital Asset Pricing Model Trend EA Inputs and Value Reference

22 May 2026, 23:13
Phillip James Orange
0
11
Capital Asset Pricing Model Trend EA Inputs and Value Reference Capital Asset Pricing Model Trend EA Inputs and Value Reference

This guide explains the main inputs for the Capital Asset Pricing Model Trend EA and what the values represent. It is intended to help users understand the EA settings before adjusting risk, signal, benchmark, basket, dashboard, learning, or trade-management parameters.

EA product page:
https://www.mql5.com/en/market/product/176249

The CAPM EA uses a structured CAPM-inspired decision process. It evaluates the chart symbol, benchmark or basket context, volatility, spread, data quality, broker conditions, and configured risk limits before allowing a trade. The purpose is not to force frequent trading, but to decide whether current conditions are suitable for a controlled automated entry or trade-management action.

How to Use This Reference

  • Use the provided preset as a starting point.
  • Change only one or two settings at a time.
  • Test changes in the Strategy Tester and on demo first.
  • Do not loosen protective filters too quickly just because the EA is waiting.
  • For live use, start with balanced or conservative settings.
  • Keep broker conditions in mind, especially spread, stop level, freeze level, minimum lot, contract size, and symbol suffixes.

Quick Value Guide

Term Meaning
true The feature is enabled.
false The feature is disabled.
R The initial trade risk.
Points Broker symbol point units used for spread, slippage, stop buffers, and broker-distance checks.
Score The EA's internal signal confidence or quality rating.
Benchmark The reference symbol used for CAPM comparison.
Basket A group of reference symbols used to form broader market context.
Shadow Learning Virtual observation logic that can review signals without needing to place a real trade.

Core Settings

Input Name What It Controls Common Values / Notes
Magic Number Unique identifier used by the EA to manage only its own trades. Use a different number for each chart, symbol, or strategy instance.
Trade Comment Trade comment shown in MT5 trade history. Example: CAPM_V3_AI or CAPM_XAUUSD_ICM.
Market Validation Mode Enables safer and quieter behaviour for MQL5 validation or controlled testing. true for validation, false for normal demo/live testing.
Strict Magic Management Forces the EA to manage only positions matching its magic number. true recommended.
Max Positions This EA Maximum open positions allowed for this EA instance. Usually 1 or 2.
Max Trades Per Day Limits how many new trades the EA can open in one day. Lower for conservative presets, higher for aggressive demo testing.

Symbol and Broker Compatibility

Input Name What It Controls Common Values / Notes
Auto Resolve Broker Symbols Allows the EA to resolve broker-specific symbol names. true recommended.
Symbol Resolver Search All Symbols Allows the resolver to scan all broker symbols, not only Market Watch. true is useful for multi-broker compatibility.
Broker Symbol Alias Map Optional alias list for broker-specific names. Example: XAUUSD=GOLD,XAUUSD.r,XAUUSDm;US500=SPX500,SP500.
Use Canonical Symbol Identity Normalizes broker symbols into standard identities. true recommended.
Reject Same Asset Benchmark Prevents the EA from using the same asset as its benchmark. true recommended.

The broker resolver is useful when brokers use different names for the same market. For example:

  • XAUUSD, XAUUSD.r, XAUUSDm, or GOLD can be treated as the same gold market family.
  • US500, SPX500, SP500, or US500.cash can be treated as the same index family.
  • EURUSD, EURUSD.a, or pro.EURUSD can be resolved as the same FX pair.

This does not remove the need to test the exact broker symbol. It helps the EA classify symbols, resolve benchmarks, and avoid incorrect same-asset comparisons.

Timeframe Settings

Input Name What It Controls Common Values / Notes
Signal Timeframe Main signal timeframe used by the EA. M15 or M30 for many presets.
Benchmark Timeframe Timeframe used for benchmark or basket comparison. Often the same as signal timeframe or slightly higher.
Use Closed Bar Signals Uses completed candles rather than forming candles. true recommended.
Trade Only On New Bar Allows entries only when a new bar forms. true recommended to reduce overactivity.

Suggested Starting Timeframes

Symbol Conservative Balanced Aggressive
XAUUSD M30 M15 M15
EURUSD H1 M30 M15
US500 M30 M15 M15

CAPM Benchmark and Basket Settings

Input Name What It Controls Common Values / Notes
Benchmark Symbol Main reference symbol used for CAPM comparison. Broker-specific index, FX, or market proxy.
Use Basket Benchmark Uses a basket of symbols instead of only one benchmark. true for broader context, false for simpler setup.
Basket Symbols Comma-separated list of basket symbols. Example: US500,USTEC,EURUSD.
Minimum Benchmark Bars Minimum amount of data required before benchmark logic is trusted. Higher values are more stable.
Beta Stability Filter Reduces CAPM influence when beta is unstable or noisy. true recommended.
Regime Adaptive CAPM Weighting Adjusts CAPM influence based on market regime. true recommended.

Signal Engine Settings

Input Name What It Controls Common Values / Notes
Use Signal Snapshot Engine Collects signal data into one structured snapshot before scoring. true recommended.
Use Data Health Score Scores whether the current data is reliable enough to trade. true recommended.
Use Cost Adjusted Signal Model Adjusts signal quality for spread, estimated slippage, and trading cost. true recommended.
Use Setup Classifier Classifies the type of setup being evaluated. true recommended.
Minimum Signal Score Minimum score required before the EA can consider a trade. Higher values mean fewer trades.
Minimum Signal Delta Minimum gap between buy and sell scores. Higher values require clearer direction.

The signal engine is designed to separate the market signal, the trade permission status, and the reason a trade is allowed or blocked. This helps avoid confusion when the EA has a valid signal but still waits because of spread, risk, calendar, session, or broker conditions.

Data Health and Market Quality

Input Name What It Controls Common Values / Notes
Use Data Health Score Checks quality of bars, ticks, spread, ATR, benchmark readiness, and related data. true recommended.
Minimum Data Health To Trade Minimum data-health score required for trading. Conservative presets use higher values.
Block Stale Ticks Blocks trading when the price feed appears stale. true recommended.
Maximum Spread Points Maximum allowed spread in points. Must be adapted to broker and symbol.
Spread Shock Multiplier Blocks unusual spread expansion. Higher is more tolerant.
ATR Shock Multiplier Detects abnormal volatility expansion. Higher is more tolerant.

Risk Governor

Input Name What It Controls Common Values / Notes
Risk Percent Risk percentage used for new trades. Lower for conservative, higher for aggressive demo testing.
Maximum Daily Loss Percent Daily loss limit before the EA stops new trades. Lower values are more protective.
Maximum Lot Per Trade Maximum lot allowed per trade. Match account size and broker conditions.
Use Risk After Lot Normalization Check Rechecks real risk after broker lot rounding. true recommended.
Block Minimum Lot Over Risk Blocks trades if the minimum broker lot would exceed allowed risk. true recommended.
Maximum Consecutive Losses Number of consecutive losses allowed before protection activates. Use carefully; day-scoped logic is recommended.

The post-normalization risk check is important because a broker's minimum lot may be larger than the calculated safe lot. If the minimum lot would exceed the intended risk, the EA can block the trade instead of silently over-risking.

Broker and Execution Safety

Input Name What It Controls Common Values / Notes
Maximum Slippage Points Maximum allowed deviation for order execution. Must match symbol volatility and broker conditions.
Modify Cooldown Seconds Minimum time between position modifications. Helps reduce excessive broker requests.
Respect Stop Level Checks broker stop-level requirements. true recommended.
Respect Freeze Level Checks broker freeze-level restrictions. true recommended.
Netting Foreign Exposure Guard Helps avoid managing unrelated exposure on netting accounts. true recommended.
Validation Quiet Mode Reduces unnecessary activity during validation/testing. true in validation mode.

Calendar and News Risk

Input Name What It Controls Common Values / Notes
Use Calendar News Filter Enables internal MT5 calendar/news-risk awareness where available. true recommended.
Auto Calendar Currency Mapping Maps calendar currencies from the chart symbol. true recommended.
Calendar Currencies Manual currency override if needed. Example: USD or EUR,USD.
News Pre Minutes Minutes before an event when the EA may reduce or block trading. Higher values are more cautious.
News Post Minutes Minutes after an event when caution remains active. Higher values are more cautious.

Shadow Learning

Input Name What It Controls Common Values / Notes
Use Shadow Learning Enables virtual signal observation without necessarily opening real trades. true is useful for learning.
Use Virtual Shadow Management Simulates trade management logic on virtual trades. true recommended for richer shadow review.
Use Reason Based Shadow Learning Tracks why signals were taken, blocked, or skipped. true recommended.
Use Recency Weighted Learning Gives more weight to recent results while retaining long-term context. true recommended.
Use Abnormal Condition Learning Filter Reduces learning weight from abnormal conditions. true recommended.

Optional SQLite Learning Memory

Input Name What It Controls Common Values / Notes
Use SQLite Learning Memory Enables optional SQLite learning storage. false for first testing; true only after stable demo testing.
SQLite Learning File Database file used for structured learning memory. The default file name is usually fine.
SQLite Maintenance Minutes Light maintenance interval. Use a slow interval.
SQLite Vacuum Hours Deep database cleanup interval. Use a long interval; do not run constantly.
SQLite Prune Days Retention period for old non-critical learning rows. Keep enough history for review.

SQLite learning is optional. It can provide more structured long-term memory, but it also adds database activity and complexity. For first testing, it is usually better to leave it disabled. After the EA is stable on demo, it can be tested carefully.

Trade Management

Input Name What It Controls Common Values / Notes
SL ATR Multiplier Stop-loss distance based on ATR. Higher gives more room, lower is tighter.
TP RR Take-profit target using risk/reward logic. Higher aims for larger moves but may reduce hit rate.
Use Breakeven Enables breakeven protection. true recommended.
Breakeven Trigger R Profit level in R before breakeven may activate. Lower protects earlier.
Use Trailing Stop Enables trailing stop management. true recommended.
Trail Start R Profit level in R before trailing begins. Higher waits longer.
Use Profit Giveback Protects trades that moved into profit but then weakened. true recommended.
Use Partial Close Allows partial profit-taking where broker and lot size support it. Use carefully.

Dashboard Settings

Input Name What It Controls Common Values / Notes
Show Dashboard Shows or hides the dashboard. true recommended.
Use Object Dashboard Uses the graphical object dashboard. true for the enhanced dashboard.
Dashboard Mode Selects compact, standard, diagnostic, or marketplace style view. STANDARD for daily use.
Dashboard Show Traffic Lights Shows signal/data/risk/broker/trade status summary. true recommended.
Dashboard Show Why No Trade Shows why the EA is waiting or blocked. true recommended.
Dashboard Show Position Panel Shows open trade management details. true recommended.
Dashboard Show Resolver Panel Shows broker symbol resolver information. true useful for suffix/prefix brokers.

Performance and Maintenance

Input Name What It Controls Common Values / Notes
Use Resolver Cache Caches broker symbol resolutions to avoid repeated scanning. true recommended.
Use Indicator Handle Cache Reuses indicator handles for performance. true recommended.
Journal CSV Enables CSV journal logging where supported. false in validation mode, optional for diagnostics.
Learning Journal CSV Records learning-related journal data. Optional; disable for lighter testing.
Shadow Journal CSV Records shadow-learning details. Optional; disable for lighter testing.

Boolean Values

  • true means the feature is enabled.
  • false means the feature is disabled.

R-Based Values

Some trade-management inputs use R values. R means the initial trade risk.

Example Meaning
0.30R 30% of the initial risk amount.
1.00R Price has moved by the same amount as the original risk.
2.00R Price has moved twice the original risk.

Points-Based Values

Spread, slippage, stop buffers, and broker-distance settings are usually measured in points. A point depends on the symbol's digit format, so check the broker's symbol specification before changing point-based values. XAUUSD, EURUSD, US500, and BTCUSD may all use different point sizes and contract specifications.

Recommended Adjustment Approach

  • Start with a preset close to your risk style.
  • Change only one or two settings at a time.
  • Keep a backup of the original preset.
  • Test in the Strategy Tester and on demo first.
  • Do not reduce filters only because the EA is waiting.
  • Confirm the dashboard reason before changing inputs.
  • For live use, start with balanced or conservative settings.
  • Use different magic numbers for different symbols or strategy instances.

Generic Reference Presets

CAPM can be used with different activity profiles. These presets are intended as reference starting points only. They should be adjusted for broker spread, stop level, commission model, symbol name, account size, and trading conditions.

XAUUSD Reference Profiles

Profile Suggested Timeframe General Character
Conservative M30 Higher signal selectivity, lower risk, more cautious spread and data-health requirements.
Balanced M15 General starting point for demo and forward testing.
Aggressive M15 More active profile; demo testing recommended before any live use.

EURUSD Reference Profiles

Profile Suggested Timeframe General Character
Conservative H1 Cleaner trend and CAPM confirmation, lower activity, lower risk.
Balanced M30 General starting point for observing signal quality and trade management.
Aggressive M15 More active profile; requires careful spread, session, and calendar testing.

US500 Reference Profiles

Profile Suggested Timeframe General Character
Conservative M30 More selective entries and useful around index volatility.
Balanced M15 General starting point for demo testing with broker-aware spread and risk checks.
Aggressive M15 More active profile; should be tested carefully on demo first.

Suggested Starting Setup

Area Suggested Starting Value
Symbol XAUUSD, EURUSD, US500, or broker equivalent.
Chart Timeframe Use the preset guide above.
Benchmark / Basket Use broker-resolved symbols where possible.
Dashboard Mode Standard or Diagnostic.
SQLite Learning Disabled for first testing.
Calendar / News Filter Enabled where available.
Broker Resolver Enabled.
Risk After Lot Normalization Check Enabled.
Shadow Learning Enabled for observation.
Validation Mode Enabled only when testing for MQL5 validation behaviour.

These presets and settings do not guarantee results. Always test in the Strategy Tester and on demo before using any preset on a live account. Trading involves risk, and losses are possible.

Files:
Genericsets.zip  33 kb