EA .set Files Explained: How to Tune a Scalp Strategy Safely

Published: 2026/02/03 Updated: 2026/02/05 Permalink
EA .set Files Explained: How to Tune a Scalp Strategy Safely

An EA .set file is not just a collection of numbers. It is the control panel that defines when your strategy is allowed to trade, when it must stay silent, and how much risk it can take.

In this article, we use a real scalping EA configuration as an example and explain what each group of parameters means, why you should adjust them, and how backtesting turns these adjustments into performance gains.

Scope:
This guide focuses on scalping strategies: short holding times, small targets, strict filters, and high sensitivity to market conditions.

Example: A Real Scalping .set File

;==================================================
; Tokyo_Scalp_USDJPY_M5.set
;==================================================
; NOTE:
; - ALL distance inputs are in POINTS (not pips).
; - For USDJPY (typical 3-digit pricing): 1 pip = 10 points.

InpZone=Tokyo
InpEaName=Tokyo_Scalp_USDJPY_M5
InpMagic=2026012701
InpEaId=ea-tokyo-scalp-usdjpy-m5
InpEaVersion=0.3.8

InpTargetPair=USDJPY
InpTargetTf=PERIOD_M5

InpTrackEnable=true
InpTrackSendOpen=true

InpStartHour=0
InpEndHour=24
InpUtcOffset=9

InpBbPeriod=20
InpBbDev=2.0

InpRsiPeriod=14
InpRsiBuyBelow=35.0
InpRsiSellAbove=65.0

InpAtrPeriod=14
InpAtrMinPoints=5
InpAtrMaxPoints=90

InpUseAdxFilter=true
InpAdxPeriod=14
InpMinAdxToTrade=5.0
InpMaxAdxToTrade=25.0

InpSlPoints=35
InpTpPoints=55

Understanding Parameter Groups

1. Session Control – InpStartHour / InpEndHour

Scalping performance depends heavily on when the market is active. These parameters define the trading window in local time.

Adjusting session hours allows you to:

  • Avoid low-liquidity periods
  • Target specific market behaviors (range vs momentum)
  • Reduce noise outside your strategy’s edge

2. ATR – Volatility Acceptance Filter

ATR (Average True Range) measures how much the market is moving. For scalping, volatility must be:

  • Not too low (no movement → no profit)
  • Not too high (spikes → stop-outs)

That is why ATR is often used as a window gate:

  • InpAtrMinPoints blocks flat markets
  • InpAtrMaxPoints blocks unstable or news-driven moves

Changing these values directly controls how calm or active the market must be before the EA is allowed to trade.

3. ADX – Trend vs Range Detection

ADX (Average Directional Index) does not measure direction. It measures trend strength.

For mean-reversion or scalp strategies:

  • Very low ADX → random noise
  • Very high ADX → strong trend (dangerous for counter-trend scalps)

By defining a minimum and maximum ADX range, you tell the EA:

  • Trade only when the market is structured but not trending hard

This single filter often reduces overtrading dramatically while improving win-rate consistency.

4. SL / TP – Risk Geometry

In scalping, stop-loss and take-profit are not just exits. They define:

  • Expected holding time
  • Sensitivity to spread and slippage
  • Profit factor ceiling

Adjusting these values without adjusting filters usually fails. They must be tuned together with ATR and spread conditions.

Why You Must Adjust These Numbers

Markets change. Brokers differ. Spreads widen. Liquidity shifts.

A fixed .set file is not robust by default. Robustness comes from:

  • Understanding what each parameter does
  • Adjusting them to current market structure
  • Validating changes with backtests

Backtesting: Turning Parameters into Performance

Backtesting is not about finding the “best numbers”. It is about understanding:

  • Which filters reduce bad trades
  • Which ranges are stable over time
  • Where performance collapses

A good workflow:

  1. Adjust one group (e.g., ADX)
  2. Run a long backtest
  3. Check trade count, drawdown, and stability
  4. Only then move to the next group
Key principle:
A .set file does not create an edge.
It defines the environment in which your edge is allowed to operate.

Professional EA development is not about secret values. It is about structure, filters, and disciplined testing.

Publishing a real .set file with explanations like this helps others learn how to think about trading systems, not how to blindly copy them.

Listen to this content on Podcast

If this helped your EA work, share it.
X Facebook LinkedIn

Keisuke Kurosawa
Hello
Share
https://1kpips.com/en/blog/how-to-tune-ea-set-file-scalping
Categories
MT5 Strategy Testing & Optimization
Tags
EA Set File, MT5 Scalping Strategy, ADX ATR Trading, EA Parameters, EA Backtesting Guide

Related Articles

Next step
Save this idea into your EA: add a session filter, then backtest with and without it to see the difference.