OPEN-SOURCE SCRIPT
FOREX Strength Matrix PRO | Auto·Scalp·Swing·Manual

Strategy type
Multi-session FX divergence engine (long/short) designed for scalping, day-trading, swing-automation on any major/cross.
What it does
The script hunts for moments when one currency is clearly dominating another and converts that edge into trades on the selected pair.
Four strength factors (-100→+100 each)
• Price Return (STR) – raw 1-bar % change.
• Relative Volume (RVOL) – today’s volume ÷ 30-bar SMA.
• Relative Volatility (VOL) – ATR% ÷ 30-bar SMA of ATR%.
• Normalised Momentum (MOM) – price momentum / ATR%.
Matrix build
• Values from 21 symbols roll up to the 7 G-7 currencies.
• Each factor crowns a strongest & weakest currency; weights
(40 / 30 / 20 / 10 %) turn those into ± contributions.
• Result = TOTAL % score per currency.
EDGE gap trigger
• EDGE = TOTAL_base − TOTAL_quote (range −200…+200).
• Long when EDGE ≥ threshold; Short when EDGE ≤ −threshold.
• Default threshold 150 % ⇒ only act on wide divergences.
Timing rails
• Session filter: London, New-York, Tokyo, Sydney boxes.
• Optional contrarian mode: flips all entries.
Risk engine
• Stop & target = ATR × inputs (default 3×).
• Hard flat when EDGE flips sign (dominance lost).
Visual aids
• One-glance strength “Matrix” table.
• Live best-pair suggestion (strongest vs. weakest currency).
• Technical-Rating overlay (All / MA / Osc).
All request.security() calls use lookahead_off → no repaint.
Default inputs (1H template)
Reference TF = Chart
ATR length = 14
Momentum length = 10
RVOL window = 30
VOL window = 10
Factor weights = 40 / 30 / 20 / 10
Trade when EDGE ≥ = 150 %
Stop ATR× / Target ATR× = 3 / 3
Back-test properties used in screenshots
Initial capital 100 000 (quote currency)
Order size 5 % of equity
Pyramiding 1
Commission 0.01 per lot
Slippage 3 ticks
Fills Bar magnifier ✔ · On bar close ✔ · Standard OHLC ✔
How to use
Add to any major/cross chart (default set = USDJPY 1 H).
In Inputs set Pair to trade equal to chart symbol.
Tick the sessions that suit your style.
Leave threshold 150 % or tighten/loosen as desired (50–200 %).
Adjust ATR stops if your broker’s spreads are wider/narrower.
Forward-test on demo; tune commission/slippage to reality.
Important notes
Built exclusively with TradingView built-in data; no external feeds.
No look-ahead, no intrabar repaint, open-source for audit.
Works on any timeframe.
Long/short symmetric; set Reverse logic to fade extremes instead.
Historical results never guarantee future performance; markets evolve.
Credits
TradingView for their technical analysis rating script.
Trade smart, manage risk, and may the strongest currency be with you!
Multi-session FX divergence engine (long/short) designed for scalping, day-trading, swing-automation on any major/cross.
What it does
The script hunts for moments when one currency is clearly dominating another and converts that edge into trades on the selected pair.
Four strength factors (-100→+100 each)
• Price Return (STR) – raw 1-bar % change.
• Relative Volume (RVOL) – today’s volume ÷ 30-bar SMA.
• Relative Volatility (VOL) – ATR% ÷ 30-bar SMA of ATR%.
• Normalised Momentum (MOM) – price momentum / ATR%.
Matrix build
• Values from 21 symbols roll up to the 7 G-7 currencies.
• Each factor crowns a strongest & weakest currency; weights
(40 / 30 / 20 / 10 %) turn those into ± contributions.
• Result = TOTAL % score per currency.
EDGE gap trigger
• EDGE = TOTAL_base − TOTAL_quote (range −200…+200).
• Long when EDGE ≥ threshold; Short when EDGE ≤ −threshold.
• Default threshold 150 % ⇒ only act on wide divergences.
Timing rails
• Session filter: London, New-York, Tokyo, Sydney boxes.
• Optional contrarian mode: flips all entries.
Risk engine
• Stop & target = ATR × inputs (default 3×).
• Hard flat when EDGE flips sign (dominance lost).
Visual aids
• One-glance strength “Matrix” table.
• Live best-pair suggestion (strongest vs. weakest currency).
• Technical-Rating overlay (All / MA / Osc).
All request.security() calls use lookahead_off → no repaint.
Default inputs (1H template)
Reference TF = Chart
ATR length = 14
Momentum length = 10
RVOL window = 30
VOL window = 10
Factor weights = 40 / 30 / 20 / 10
Trade when EDGE ≥ = 150 %
Stop ATR× / Target ATR× = 3 / 3
Back-test properties used in screenshots
Initial capital 100 000 (quote currency)
Order size 5 % of equity
Pyramiding 1
Commission 0.01 per lot
Slippage 3 ticks
Fills Bar magnifier ✔ · On bar close ✔ · Standard OHLC ✔
How to use
Add to any major/cross chart (default set = USDJPY 1 H).
In Inputs set Pair to trade equal to chart symbol.
Tick the sessions that suit your style.
Leave threshold 150 % or tighten/loosen as desired (50–200 %).
Adjust ATR stops if your broker’s spreads are wider/narrower.
Forward-test on demo; tune commission/slippage to reality.
Important notes
Built exclusively with TradingView built-in data; no external feeds.
No look-ahead, no intrabar repaint, open-source for audit.
Works on any timeframe.
Long/short symmetric; set Reverse logic to fade extremes instead.
Historical results never guarantee future performance; markets evolve.
Credits
TradingView for their technical analysis rating script.
Trade smart, manage risk, and may the strongest currency be with you!
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
🔻Website: hercules.money/
🔻Blog: hercules.money/blog/
🔻Telegram : t.me/hercules_trading
🔻Trader Psychology Profile – thelumenism.com/
🔻Blog: hercules.money/blog/
🔻Telegram : t.me/hercules_trading
🔻Trader Psychology Profile – thelumenism.com/
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
🔻Website: hercules.money/
🔻Blog: hercules.money/blog/
🔻Telegram : t.me/hercules_trading
🔻Trader Psychology Profile – thelumenism.com/
🔻Blog: hercules.money/blog/
🔻Telegram : t.me/hercules_trading
🔻Trader Psychology Profile – thelumenism.com/
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.