Indi Trader
- ユーティリティ
- Hyoseog Kim
- バージョン: 1.0
- アクティベーション: 10
Indicator Trader EA
v1.0 for MetaTrader 5
Universal EA that bridges any custom indicator's signals to automated trading
XAUUSD · Major Forex Pairs · Crypto | All Timeframes M1 ~ D1
📌 Overview
Indicator Trader EA is a universal Expert Advisor that automatically executes buy and sell orders based on signal buffers from any custom indicator.
With a single EA, you can connect any commercial indicator (SuperScalp Pro, Trend 7Filter Pro, etc.) directly — no extra coding required. Simply configure the buffer indices and you have a fully automated trading system.
✨ Key Features
▸ Dual load modes: Direct Load (Mode A) / Chart Instance Auto-Detect (Mode B)
▸ Indicator buffer-based SL/TP automatic configuration
▸ ATR-based dynamic TP/SL and trailing stop
▸ Dollar-based group P&L close (Group TP/SL)
▸ Automatic position flip on opposite signal
▸ Duplicate order prevention per bar (OncePerBar)
▸ Maximum position limit (MaxPositions)
▸ Real-time Alert notifications
▸ Debug mode for live signal buffer inspection
🎯 Who Is This For?
▸ Traders who want to automate signals from commercial indicators
▸ Developers who want to add auto-order functionality to custom indicators
▸ Compatible with any symbol: XAUUSD, forex pairs, crypto, and more
⚙️ How It Works
On every tick, the EA reads the indicator's signal buffers and detects valid signals (any value other than 0 or EMPTY_VALUE).
Signal Detection Logic
▸ bar[1] confirmed signal: processed at the start of each new candle — most reliable
▸ bar[0] real-time signal: processed as the current bar forms — faster reaction
▸ Duplicate prevention: when OncePerBar=true, only one order per direction per candle
Order Execution Flow
Signal detected → Check CloseOnOppositeSignal → Close opposite positions
→ Verify CanOpenBuy/Sell() conditions → Execute OpenOrder()
→ Set SL/TP (indicator buffer OR ATR OR dollar-based)
→ Every tick: Group P&L monitoring when UseGroupClose=true
📖 How to Use
Mode A — Direct Load (Recommended)
The EA loads the indicator automatically — no need to add it to the chart separately.
IndicatorName = "Market\SuperScalp Pro" ← MQL5 Market product
IndicatorName = "Trend 7Filter Pro" ← File in Indicators folder
IndicatorName = "MyFolder\MyIndicator" ← Subfolder path
Mode B — Chart Instance Auto-Detect
Apply the indicator to the chart first, then attach the EA. It will automatically detect the running indicator instance.
IndicatorName = "" ← Leave blank
▸ Recommended when only one indicator is applied to the chart
▸ Use when you need to apply custom parameters to the indicator
How to Find Buffer Indices
You need to identify the buy/sell signal buffer indices of your target indicator.
▸ Set DebugMode = true and attach the EA
▸ Check the MetaTrader Journal tab for buffer values
▸ Refer to SetIndexBuffer() order in the indicator's source code
🔧 Input Parameters
Basic Settings
Parameter Default Description
EA_Comment SSP Comment label for orders
MagicNumber 991 Unique EA identifier (prevents conflicts with other EAs)
LotSize 0.01 Default lot size per order
Slippage 3 Maximum allowed slippage (in points)
Indicator Settings
Parameter Default Description
IndicatorName Trend 7Filter Pro Indicator filename (blank = chart auto-detect)
BuyBuffer 0 Buy signal buffer index
SellBuffer 1 Sell signal buffer index
UseIndicatorTPSL false true: use SL/TP values from indicator buffers
BuySLBuffer 4 Buy SL buffer index
BuyTPBuffer 6 Buy TP buffer index
SellSLBuffer 5 Sell SL buffer index
SellTPBuffer 7 Sell TP buffer index
Position Management
Parameter Default Description
CloseOnOppositeSignal true Close opposite positions before opening new order on signal flip
AllowOppositeOrder true Allow simultaneous opposite positions (when CloseOnOppositeSignal=false)
MaxPositions 1 Maximum number of simultaneous open positions
OncePerBar true Allow only one order per direction per bar
UseGroupClose true Group close mode: dollar TP/SL + trailing stop
TP / SL Settings
Parameter Default Description
UseTP false Enable dollar-based take profit
TP_Dollar 8.0 Take profit target in USD
UseSL false Enable dollar-based stop loss
SL_Dollar 3.0 Stop loss limit in USD
UseATR true Enable ATR-based dynamic TP/SL
ATR_Period_EA 14 ATR calculation period
ATR_TP_Multi 5.0 ATR TP multiplier
ATR_SL_Multi 1.0 ATR SL multiplier
Trailing Stop
Parameter Default Description
UseTrailing true Enable dollar-based trailing stop (requires UseGroupClose=true)
Trail_Start 27.0 Profit level to activate trailing ($)
Trail_Stop 3.0 Trailing stop drawdown threshold ($)
UseATRTrailing false Enable ATR-based trailing stop
ATR_Trail_Multi 2.0 ATR trailing multiplier
Other
Parameter Default Description
UseAlert false Show popup alert on order open/close
DebugMode false Print signal buffer values and debug info to Journal
⚠️ Important Notes
▸ Always verify your indicator's signal buffer indices and set BuyBuffer/SellBuffer correctly.
▸ When UseGroupClose=false, only server-side SL/TP per order is active — trailing stop is disabled.
▸ In Mode B, the indicator must be applied to the chart before attaching the EA.
▸ Always test thoroughly on a demo account before live trading.
▸ Past performance does not guarantee future results.
