MT4 Multi-Pair Stochastic & Moving Average Scanner v1.02
Market Watch Scanner for Currencies, Metals, Energies, CFD, Crypto, Commodities, Stocks
Scanner v1.02 Signal Logic:
Buy Signal: Now requires the Stochastic main line to be below overSoldLevel (30.0) and the price to be above the MA (if trend filter is enabled).Sell Signal: Now requires the Stochastic main line to be above overBoughtLevel (70.0) and the price to be below the MA (if trend filter is enabled).
A Comprehensive Guide
The Multi Pair Stochastic_MA_Scanner_v1.02.mq4 is a powerful custom indicator for MetaTrader 4 (MT4), designed to scan multiple currency pairs for trading opportunities based on Stochastic oscillator signals, with an optional Moving Average (MA) trend filter. Built with flexibility and usability in mind, this scanner combines real-time alerts, an intuitive dashboard, and interactive features to streamline your trading process. Whether you're a scalper, swing trader, or long-term investor, this tool offers a robust solution for identifying high-probability setups across the forex market.In this article, we’ll explore the scanner’s key functions, features, and how to leverage its capabilities—including the handy double-click functionality to open pre-configured charts for quick visualization of alerts.
Overview
The Multi-Pair Stochastic MA Scanner monitors a user-defined list of symbols (or your entire Market Watch) and generates alerts when Stochastic crossovers occur, optionally filtered by trend direction. It displays a compact dashboard on your MT4 chart, showing active signals and a list of recent alerts, with the ability to open new charts pre-loaded with Stochastic and MA indicators for instant analysis.Key Features
1. Stochastic Signal Detection
- Core Indicator: The scanner uses the Stochastic oscillator to identify buy and sell signals based on crossovers between the %K (main) and %D (signal) lines.
- Buy Signal: Triggers when %K crosses above %D (bullish crossover) and below oversold (overSoldLevel, default 30).
- Sell Signal: Triggers when %K crosses below %D (bearish crossover) and above overbought (overBoughtLevel, default 70).
- Customization: Adjust the Stochastic parameters—kPeriod, dPeriod, slowing, maMethod, and priceField—to suit your trading strategy.
- Filtering: Signals can be filtered by overbought (overBoughtLevel, default 70) and oversold (overSoldLevel, default 30) levels, plus a minimum crossover difference (minSignalDiff, default 5.0) to reduce noise.
2. Optional Trend Filter
- Purpose: Enhances signal reliability by ensuring trades align with the broader market trend.
- Indicator: Uses a Moving Average (MA) to determine trend direction.
- Logic:
- Buy signals only trigger when the current price is above the MA (uptrend).
- Sell signals only trigger when the current price is below the MA (downtrend).
- Customization:
- useTrendFilter: Toggle on/off (default: Yes).
- trendTimeframe: Set the timeframe for the MA (default: M15).
- trendMAPeriod: Adjust the MA period (default: 50).
- trendMAMethod: Choose the MA type (e.g., SMA, EMA; default: SMA).
- trendMAPrice: Select the price type (e.g., Close, High; default: Close).
- Flexibility: Disable the trend filter for pure momentum-based trading.
3. Multi-Symbol Scanning
- Symbol Sources:
- symTypeChoice: Choose between MarketWatch (scans all visible symbols in your Market Watch) or SymbolList (scans a custom comma-separated list).
- symbols: Define your custom list (e.g., "EURUSD,GBPUSD,USDJPY").
- Broker Compatibility: Add symbolPrefix and symbolSuffix to match your broker’s symbol naming conventions (e.g., "EURUSDm" or "EURUSD.pro").
- Efficiency: Automatically skips symbols with unavailable data or during closed market hours (optional via checkMarketHours).
4. Alert System
- Types:
- usePopUpAlerts: On-screen pop-ups (default: Yes).
- useMobileAlerts: Push notifications to your MT4 mobile app (default: No).
- useSoundAlerts: Audio alerts with a custom sound file (soundFile, default: "alert.wav").
- Cooldown: alertInternalMinutes (default: 30) prevents duplicate alerts for the same symbol within the specified time.
- Message: Default buyMessage (default: "BUY") and sellMessage (default: "SELL") alert text.
5. Dashboard Display
- Layout:
- Left Panel: Shows the timeframe (e.g., "M15"), followed by a list of symbols with their current alert status and Time of Alert.
- Right Panel: Displays the "Most Recent Alerts," top-aligned with the timeframe label.
- Customization:
- useDashboard: Toggle on/off (default: Yes).
- timeChoiceOption: Choose between Server or Local time for timestamps (default: Server).
- Color options (headerColor, symbolColors, alertColors etc.) for visual preferences.
- Compact Design: The alerts section is positioned to the right, allowing a longer symbol list on the left.
6. Interactive Chart Opening
- Double-Click Feature:
- Double-click a symbol in the left panel to open its chart on the scanner’s timeframe (timeframe).
- Double-click an entry in the "Most Recent Alerts" to open the corresponding symbol’s chart.
- Pre-Configured Visualization:
- New charts open with your default MT4 chart template. To visualize alerts instantly, set your default template to include:
- Stochastic oscillator (matching kPeriod, dPeriod, slowing, maMethod, priceField).
- Moving Average (matching trendMAPeriod, trendMAMethod, trendMAPrice) if useTrendFilter is enabled.
- How to Set Default Template:
- Open a chart, add Stochastic and MA with the scanner’s settings.
- Right-click the chart > Template > Save Template > Name it "Default".
- MT4 will apply this template to all new charts opened by the scanner.
- New charts open with your default MT4 chart template. To visualize alerts instantly, set your default template to include:
7. Performance and Reliability
- Refresh Rate: refreshTime (default: 5 seconds) controls how often the scanner checks for signals.
- Market Hours Filter: checkMarketHours (default: Yes) skips scans outside Monday-Friday to avoid weekend noise.
- Error Handling: Retries data downloads up to 3 times if history is unavailable, ensuring robust operation.
How to Use the Scanner
Installation
- Copy Multi Pair Stochastic_MA_Scanner_v1.02.mq4 to your MT4 Indicators folder (File > Open Data Folder > MQL4 > Indicators).
- Restart MT4 and drag the indicator onto any chart.
- Configure the inputs in the settings dialog (see below).
Configuration
- Stochastic Settings: Adjust kPeriod, dPeriod, and slowing for sensitivity (e.g., 5,3,3 for fast signals; 14,3,3 for slower).
- Trend Filter: Enable useTrendFilter and set trendTimeframe and trendMAPeriod (e.g., H4, 50 SMA for swing trading).
- Symbols: Use MarketWatch or define a custom symbols list.
- Alerts: Enable desired alert types and set alertInternalMinutes.
Operation
- Attach the scanner to a chart (any timeframe, as it uses timeframe for signals).
- Watch the dashboard for active signals and recent alerts.
- Double-click a symbol or alert to open a new chart for analysis.
- Act on alerts based on your trading plan.
Practical Example
Settings:
- timeframe: H1
- kPeriod: 5, dPeriod: 3, slowing: 3
- useTrendFilter: Yes, trendTimeframe: H4, trendMAPeriod: 50
- symTypeChoice: MarketWatch
Scenario:
- EURUSD shows a Stochastic buy signal on H1.
- The H4 price is above the 50 SMA (uptrend confirmed).
- The dashboard updates with "EURUSD H1 BUY" and adds it to "List of Recent Alerts."
- You double-click the alert, opening an H1 EURUSD chart with Stochastic (5,3,3) and a 50 SMA, confirming the setup visually.
Action: Place your trade based on the aligned signal and trend.
Tips for Optimization
- Scalping: Use a lower timeframe (e.g., M15) and disable useTrendFilter for faster signals.
- Swing Trading: Set timeframe to H1 or H4, with trendTimeframe at D1 and a longer trendMAPeriod (e.g., 200)..
- Alert Management: Adjust alertInternalMinutes to avoid spam during volatile periods.