Quant Metrics

  • ライブラリ
  • Shipra Gupta
    Shipra Gupta
    私はShipra Gupta、数学、経済学、アルゴリズム取引システムに強いバックグラウンドを持つトレーダー兼クオンツ戦略開発者です。これまで、Forex、ゴールド、指数、コモディティ、暗号資産市場に幅広く携わり、一貫性、精度、規律ある執行を重視したデータ駆動型の取引戦略を構築してきました。
  • バージョン: 1.0

QuantMetrics – Deflated Sharpe, Monte Carlo & OnTester Criteria

Stop optimising on net profit. QuantMetrics gives your EA the statistics quant funds use to separate skill from luck, in a single #import.

Features

  • Deflated Sharpe Ratio (DSR) – Bailey & López de Prado. Probability your Sharpe is real after accounting for skew, fat tails and the number of optimisation passes.
  • Probabilistic Sharpe Ratio (PSR) – Probability the true Sharpe beats any benchmark, given your sample size.
  • Monte Carlo – Trade-order reshuffling: drawdown at any percentile and probability of ruin.
  • Risk-adjusted ratios – Sharpe, Sortino, Calmar, CAGR, Ulcer Index, Ulcer Performance Index, Kestner K-Ratio, Van Tharp SQN, skewness, kurtosis.
  • 10 OnTester criteria – Recovery, Sharpe, Sortino, Calmar, UPI, K-Ratio, SQN, PSR, DSR, PSR×Calmar, with a minimum trade count.
  • Reads history directly – Filter by magic and symbol. Swaps, commissions and fees are included. Or load your own return array.

Quick start

1. Buy and download the library. MetaTrader installs it to MQL5\Libraries\QuantMetrics.ex5.
2. Paste the import block below at the top of your EA, indicator or script.
3. Call the functions.

double OnTester()
  {
   QM_BuildFromHistory(TesterStatistics(STAT_INITIAL_DEPOSIT),-1,"");
   QM_SetTrials(200);              // optimisation passes you ran
   Print(QM_Report());
   return(QM_Criterion(QM_CRIT_DSR,30));
  }

Import block (copy into your code)

#define QM_OK              0
#define QM_ERR_NODATA      1
#define QM_ERR_PARAM       2
#define QM_ERR_HISTORY     3
#define QM_CRIT_RECOVERY   0
#define QM_CRIT_SHARPE     1
#define QM_CRIT_SORTINO    2
#define QM_CRIT_CALMAR     3
#define QM_CRIT_UPI        4
#define QM_CRIT_KRATIO     5
#define QM_CRIT_SQN        6
#define QM_CRIT_PSR        7
#define QM_CRIT_DSR        8
#define QM_CRIT_PSR_CALMAR 9

#import "QuantMetrics.ex5"
int QM_LastError();
int QM_BuildFromHistory(const double initial_deposit,const long magic,const string symbol);
int QM_LoadReturns(const double &returns[],const double start_equity,const double years);
int QM_Trades();
double QM_NetProfit();
double QM_WinRate();
double QM_ProfitFactor();
double QM_Expectancy();
int QM_MaxConsecLosses();
double QM_MaxDrawdownPct();
double QM_MaxDrawdownMoney();
double QM_RecoveryFactor();
double QM_CAGR();
double QM_Skewness();
double QM_Kurtosis();
double QM_Sharpe(const bool annualize);
double QM_Sortino(const bool annualize);
double QM_Calmar();
double QM_UlcerIndex();
double QM_UlcerPerformance();
double QM_KRatio();
double QM_SQN();
double QM_ProbabilisticSharpe(const double benchmark_sr);
bool QM_SetTrials(const int trials);
double QM_DeflatedSharpe();
bool QM_MonteCarlo(const int sims,const double percentile,const double ruin_dd_pct, const uint seed,double &dd_at_percentile,double &prob_ruin);
double QM_Criterion(const int mode,const int min_trades);
string QM_Report();
#import

Notes

  • Select Custom max in the Strategy Tester to rank passes by your criterion.
  • Monte Carlo work is capped so optimisation stays fast.
  • Example on S&P 500 daily (Donchian 55/20): PSR 0.90 falls to DSR 0.11 after 100 tested variants.

Technical

  • Pure MQL5. No DLL, no WebRequest, no file I/O.
  • Every exported function validates its inputs. QM_LastError() returns the reason for any failed call.
  • Works in the Strategy Tester and live, on any broker, symbol and account currency.

Past performance shown in screenshots is from historical data and does not guarantee future results.



作者のその他のプロダクト
AMD Po3 for MetaTrader 5 Accumulation, manipulation, distribution: mapped for you. AMD Po3 is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator maps the reaction zones that matter right now: the nearest areas above and
KN Smart TP SL Signals — EMAクロスオーバー + スマートTP/SL KN Smart TP SL Signals は、MetaTrader 5向けのシンプルなEMAクロスオーバー・インジケーターです。確認済みのクロスオーバーを、完全なビジュアル・トレードセットアップに変換します。 Entry → Stop Loss → TP1 → TP2 → TP3 レベルを手動で計算する必要はありません。 基本ロジック Fast EMAがSlow EMAを上抜け → 買い Fast EMAがSlow EMAを下抜け → 売り シグナルは 確定したローソク足 で確認されるため、形成中のローソク足によるシグナルを回避します。 主な特徴 EMAクロスオーバー・シグナル Fast & Slow EMAを設定可能 ATRベースのStop Loss 設定可能なR倍数によるTP1 / TP2 / TP3 デフォルト 1.5 ATR SL / 1R / 2R / 3R TP Entry、SL、TPラインを自動表示 利益・損失ゾーンを視覚化 リアル
IFVG Sniper Entry Engine — MQL5マーケットプレイス商品説明 IFVG Sniper Entry Engineは、スマートマネー(Smart Money Concepts)の入場パターンのうち、最も具体的で確率の高いものの1つである「インバース・フェアバリューギャップ(Inverse Fair Value Gap, IFVG)」を中心に構築された高精度なMT5インジケーターです。チャート上に形成されるすべての生のFair Value Gap(FVG)を静かに追跡し、それぞれがインバージョン(反転・ reclaim)されるかどうかを監視します。そして、条件を満たすIFVGが確認された瞬間、完全なSL/TPトレードレイアウトとプッシュ通知を伴うBUYまたはSELLシグナルを発信します(過去のシグナルを含むすべてのシグナルが対象)。 仕組み 確定したバーごとに、エンジンは新しく形成された強気および弱気のFair Value Gapを、ほとんどのインジケーターが追跡することのない隠されたメモリプールに保存します。保存された各FVGは、ローソク足ごとにエージング(時間
Coppock Curve MultiFilter for MetaTrader 5 The classic Coppock curve with modern filters. Coppock Curve MultiFilter is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator plots its oscillator in a separate subwindow with
FREE
Tension Flow Trend — 過去検証RRバックテスト機能付きダイナミックHMAリボン Tension Flow Trendは、ハル移動平均線(HMA)トレンドリボン、Zスコア(Z-Score)モメンタム分析、および内蔵された視覚的なリスクリワード(Risk:Reward)バックテストエンジンを1つのチャート上に統合した、MetaTrader 5向けの高度なトレンドフォロー型インジケーターです。高確率なトレンド継続の機会を特定するように設計されており、トレードのセットアップを生成する前に、傾きで確認されたHMAのクロスオーバーと、設定可能なシグナル・クールダウン(待機時間)の両方を要求することで、市場のノイズをフィルタリングします。 有効な買い(BUY)または売り(SELL)シグナルが発生すると、インジケーターはエントリー価格、ATR(200)に基づくストップロス(損切り)、およびリスクリワード比率に基づくテイクプロフィット(利確)レベルを含む完全なトレード構造をチャート上に自動的に計算してプロットします。動的なTP(利確)およびSL(損切り)ボックスは、いずれかのレベルに
FREE
Adaptive RSI Supertrend for MetaTrader 5 Trend and RSI momentum in one view. Adaptive RSI Supertrend is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the trend: bull co
FREE
Trend Target Ribbon [BOSWaves] Trend Target Ribbon [BOSWaves] は、MetaTrader 5(MQL5)向けに設計された高度な多機能トレンドフォロー・リスク管理インジケーターです。平滑化された Arnaud Legoux Moving Average(ALMA) をコアとして、ボラティリティと傾きに基づく確認フィルターを組み合わせ、市場トレンド、カラー表示されたダイナミックリボン、複数段階のRisk-to-Reward($R$)トレード目標を自動的に可視化します。 主な機能 1. ALMAトレンドリボンと傾きフィルター ALMA Smoothing Engine: Arnaud Legoux Moving Averageのコアラインを使用し、市場ノイズに対する滑らかさを維持しながら遅延を低減します。Length、Offset、Sigmaを調整可能です。 Volatility & Slope Validation: 標準偏差バンドとAverage True Range(ATR)に対する傾きの閾値を測定し、トレンドのモメンタムを確
FREE
Structure-Anchored VWAP [WAT] Structure-Anchored VWAP [WAT] は、MetaTrader 5向けのマーケットストラクチャー対応VWAPインジケーターです。固定されたセッションリセットだけに依存せず、意味のあるスイングポイントやストラクチャーポイントにVWAPをアンカーします。 マーケットストラクチャー + Anchored VWAP + 偏差バンド + リテストシグナル + ATRベースのトレード管理 を、ひとつのビジュアルフレームワークに統合しています。 主な機能 3つのアンカーモード — Swing、Structure、Fast ストラクチャー検出 — HH、HL、LH、LL、EQH、EQL Anchored VWAP — 意味のあるストラクチャーの動きにVWAPが追従 偏差バンド — オプションで0.5σおよび2σを表示 Premium / Fair Value / Discount ゾーン 設定可能な変位後の VWAPリテストシグナル ストラクチャーに基づく VWAPの強気/弱気カラーリング
FREE
Liquidity Intelligence System — MQL5マーケットプレイス商品説明 Liquidity Intelligence Systemは、スマートマネー(Smart Money)の流動性プールをマッピングし、流動性ハント&反転(sweep-and-reverse)のセットアップを検出し、16の独立して検証可能なシグナルモデルを通じて高根拠なトレードシグナルを生成する、機関投資家レベルのMT5インジケーターです。これらすべての機能が、1つの洗練されたインジケーター内に収められています。 仕組み このエンジンは、ピボット(高値・安値)ベースのバイサイド・リクイディティ(BSL)およびセルサイド・リクイディティ(SSL)ゾーン(同値高値(EQH)および同値安値(EQL)を含む)を検出することにより、ライブ・リクイディティマップを継続的に構築します。価格が条件を満たす拒絶のヒゲ(rejection wick)を伴って流動性レベルをスイープ(通過)すると、ベースとなるスイープシグナルが生成されます。この生のシグナルは、その後、最大6つのオプションの根拠レイヤー(EMAトレ
Precision Sniper Trader Precision Sniper Traderは、FX、ゴールド、インデックス(株価指数)、暗号資産市場において、無駄のないクリーンなチャート執行、高確率なエントリー、そして構造化されたトレード管理を求めるトレーダーのために設計された、プロフェッショナル向けのトレンドフォローおよびモメンタム確認インジケーターです。 スナイパースタイル(精密射撃)のアプローチで構築されたこのインジケーターは、EMAトレンド分析、モメンタムの確認、ATRベースの動的ターゲット、そしてインテリジェントな信号フィルタリングを組み合わせることで、チャートのノイズや不必要な乱れを減らしつつ、トレーダーが強力な市場機会を特定できるように支援します。 従来の移動平均線クロスオーバーシステムとは異なり、Precision Sniper Traderはトレンドの方向性の一致、ボラティリティ調整済みのトレード管理、およびクリーンな執行の可視化に焦点を当てており、スキャルピング、デイトレード(イントラデイ)、スイングトレードに適しています。 主な機能 高度なトレンド検出 Pre
FREE
TrendIQ Pro for MetaTrader 5 Adaptive volatility trend with a trend cloud. TrendIQ Pro is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the trend: bull colour for long
SQUEEZE MOMENTUM BREAKOUT MT5 インジケーター MetaTrader 5 専用 プロフェッショナル・ボラティリティ圧縮&モメンタムブレイクアウト・トレーディングシステム Squeeze Momentum Breakoutは、低ボラティリティの保ち合い期(レンジ相場)の後に発生する爆発的な市場の動きを検出するために設計された、MT5用のプロフェッショナルグレードのブレイクアウトインジケーターです。スキャルパー、デイトレーダー、そしてモメンタムトレーダーのために構築されており、ボラティリティの圧縮、モメンタムの確認、ボリューム(出来高)フィルター、および体系的なトレード管理を一つの完全なトレード枠組みに統合しています。 このインジケーターは、スクイーズ(圧縮)ゾーン、ブレイクアウトの機会、トレンド拡大フェーズを自動的に識別し、エントリー(Entry)、損切り(Stop Loss)、ならびにTP1、TP2、TP3の各レベルをチャート上にダイナミックにプロットして、構造化されたトレード執行と管理を可能にします。 以下に最適化されています: XAUUSD (ゴールド)
FREE
VOLUME BREAKOUT PRO MT5 インジケーター MetaTrader 5 専用 プロフェッショナル・ボリュームエクスパンション&ブレイクアウト・トレーディングシステム Volume Breakout Proは、MetaTrader 5プラットフォーム専用に開発された機関投資家グレード(インスティテューショナル)のブレイクアウトトレーディングインジケーターです。スキャルパー、デイトレーダー、モメンタムブレイクアウトトレーダー向けに設計されており、異常な出来高(ボリューム)の拡大と流動性の不均衡によって引き起こされる爆発的な価格変動を特定することに特化しています。 このインジケーターは以下を統合しています: ボリューム・ウェイティッド・オシレーター(VWO:出来高加重オシレーター)ロジック ピボット(Pivot)ブレイクアウト検出 モメンタムの拡大 ATRベースのトレード管理 動的なブレイクアウト構造のマッピング これにより、プロフェッショナルなリスク管理を伴う高確率なブレイクアウトの機会をチャート上に直接提供します。 Volume Breakout Proは以下を自動検出
FREE
Meridian Flow — MT5用 Smart Money Structure インジケーター Meridian Flowは、 Smart Money Concepts(SMC) および ICT Price Action を使用するトレーダー向けに設計されたMetaTrader 5インジケーターです。あらゆる銘柄・時間足でBOS(Break of Structure)とCHoCH(Change of Character)を自動検出し、各シグナルに対してEntry、Stop Loss、TP1、TP2、TP3を含む完全なリスクマップを表示します。過去のシグナルにも対応しています。 シグナルは確認済みの確定足でのみ発生します。 リペイントなし。推測なし。 Meridian Flowの特徴 多くのストラクチャー系インジケーターは、現在アクティブなトレードだけを表示します。Meridian Flowはチャート上のすべての過去シグナルに対してSLとTPレベルを描画し、それぞれを独立した将来のローソク足範囲に限定します。これにより、実資金を投入する前に、さまざまな相場環境でのインジケーターの
Adaptive Trend System for MetaTrader 5 A trend line that adapts to volatility. Adaptive Trend System is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the trend: bull co
Market Path Forecast for MetaTrader 5 Projected price paths from swing statistics. Market Path Forecast is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator detects confirmed swing highs and lows and tracks how price b
FREE
RSI Signal Entries for MetaTrader 5 RSI extremes plus candle confirmation. RSI Signal Entries is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator plots its oscillator in a separate subwindow with clear extreme zones.
FREE
Trident Swing Projector for MetaTrader 5 Quarter-swing projections from ABC structures. Trident Swing Projector is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator detects confirmed swing highs and lows and tracks how
Z-Score Range Boxes Breakout for MetaTrader 5 Statistical extremes boxed, breakouts flagged. Z-Score Range Boxes Breakout is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator tracks the range or channel price is tradin
Precision Sniper Pro for MetaTrader 5 Four pillars: EMA, RSI, MACD and ADX. Precision Sniper Pro is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator watches for its signal condition and waits for the candle to close b
FREE
Stealth Trail Supertrend for MetaTrader 5 A supertrend that adapts its own multiplier. Stealth Trail Supertrend is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the tre
Fibonacci Path Profile for MetaTrader 5 How price moved after similar retracements. Fibonacci Path Profile is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator detects confirmed swing highs and lows and tracks how pric
Strong Fade Signals for MetaTrader 5 Fade the overextended move, with a score. Strong Fade Signals is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator watches for its signal condition and waits for the candle to close
FREE
Fan Principle Signals for MetaTrader 5 The classic fan principle, as clear signals. Fan Principle Signals is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator detects confirmed swing highs and lows and tracks how price
McGinley Dynamic Fusion for MetaTrader 5 McGinley Dynamic crossovers with ATR levels. McGinley Dynamic Fusion is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the trend
Liquidity Entry Signals for MetaTrader 5 Entries where liquidity gets taken. Liquidity Entry Signals is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator maps the reaction zones that matter right now: the nearest areas
Cardwell Range Pro for MetaTrader 5 RSI ranges that change with the market regime. Cardwell Range Pro is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator plots its oscillator in a separate subwindow with clear extreme
Adaptive RSI Supertrend for MetaTrader 5 Trend and RSI momentum in one view. Adaptive RSI Supertrend is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator draws one trend line that changes colour with the trend: bull co
Market Structure Target Tracker for MetaTrader 5 Swings, BOS, CHoCH and ATR targets. Market Structure Target Tracker is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator detects confirmed swing highs and lows and track
Smart TrendFlow Pro for MetaTrader 5 Channel breaks with a volatility heatmap. Smart TrendFlow Pro is a MetaTrader 5 indicator built for traders who want clear, rule-based chart reading without clutter. It focuses on one job and does it visibly on your chart, so you can make decisions faster and with more confidence. It works on gold (XAUUSD), forex, indices and crypto, on any timeframe from M5 to D1. How it works The indicator tracks the range or channel price is trading in and highlights per
フィルタ:
レビューなし
レビューに返信