Prop Scalper Gold
- Experts
- 버전: 1.3
- 활성화: 5
Prop Scalper Gold is an Expert Advisor for gold that trades the breakout of the previous bar in the direction of the trend, with the rules of prop firm challenges built in. It was developed and tested on XAUUSD H3. A trade opens when price crosses the high or the low of the previous bar during the current bar, only if the trend, the strength of the move, the momentum, the session and the spread agree. Every trade has a stop loss and a take profit sized on the ATR, then break even and a trailing stop protect it. A daily loss limit and a total loss limit watch the account and stop the EA before a prop firm rule is broken. No grid, no martingale, no averaging, one position at a time per direction.
The idea is simple on purpose. A breakout of the previous bar in a healthy trend is one of the most common ways a gold move continues, but taken without filters it gives many false signals. This EA keeps the entry simple and puts the work in the filters and in the management of the trade. The default settings are the ones used in the Strategy Tester results shown on this page.
HOW IT WORKS
For a long trade the level is the high of the previous bar, for a short trade the low, with an optional buffer. By default the previous bar must also confirm the direction with its body: a bullish bar for longs, a bearish bar for shorts, with a body of at least 0.1 ATR. The EA then waits for a real cross: the current bar must open on the right side of the level and price must cross it during the bar. A long opens when the ask goes above the level, a short when the bid goes below it. At most one entry per direction is allowed on each bar, so a failed order never turns into a burst of retries, and a new long is blocked while a short is open, and the other way round.
Entries are checked on every tick, so the trade opens at the moment of the breakout and not at the next bar. The indicators used by the filters are read on the last closed bar, so they do not change while the current bar is forming.
FILTERS
Trend. The fast EMA 8 must be above the slow EMA 21 for a long, with both rising over the last 2 bars; for a short the fast EMA must be below the slow one and both falling. A breakout against the trend is ignored.
Strength. The ADX 14 must be at 20 or above. Below that level the market is usually flat and breakouts of the previous bar tend to fail.
Momentum. The RSI 14 must be between 50 and 85 for a long and between 15 and 50 for a short. This keeps the EA out of trades without momentum and out of moves that are already overextended.
Session. By default the EA trades from 8:00 to 16:00 UTC, the London morning and the New York open, when gold has volume and tighter spreads. The hours are in UTC and the EA converts them from the server time of your broker, daylight saving time included.
Spread. When the spread is above 0.3 ATR the entry is skipped. Using the ATR instead of a fixed number of points keeps the filter valid when gold moves from quiet to busy markets.
Volatility spike. The EA watches the ticks: when price moves 0.8 ATR within 3 seconds, typically on a news release, new entries are blocked for 30 seconds.
Cooldown. After an entry or an exit the EA waits 30 seconds before the next entry. You can apply the cooldown only after a losing trade.
Friday cutoff. No new trades after 20:00 UTC on Friday, and the open positions are closed at that time, so nothing is left open over the weekend gap.
TRADE MANAGEMENT
With the default ATR exit the stop loss is 1.6 times the ATR 14 of the last closed bar and the take profit is 2.0 times the ATR. When the trade is 1.0 ATR in profit, the stop moves to the entry price plus 0.1 ATR, so the trade cannot turn into a loss. From 1.2 ATR in profit the trailing stop follows price at a distance of 0.5 ATR, moving in steps of 0.1 ATR. Because every distance is measured in ATR, the trade adapts to the volatility of the moment: wider in busy markets, tighter in quiet ones.
The ATR is calculated with exponential smoothing of the true range, which reacts faster to a change in volatility than the classic smoothing.
Other exit types are available: fixed stop and target in pips, closing every trade at the close of the bar, or closing at the bar close with a stop and a target in pips. In the bar close mode an emergency stop of 2 ATR is always placed, so no position is ever left without a stop. The setting Short Uses Long Values, on by default, applies the long values of stop, target, break even and trailing to the short trades too; turn it off to set the two sides separately.
RISK AND POSITION SIZE
With Use Risk Per Trade on, the lot is calculated so that a stop loss costs the chosen percentage of equity, 0.5% by default. The calculation uses the real value of a point on your account and checks the free margin, the minimum and maximum lot and the volume limit of the broker before every order.
If the risk you set needs a lot smaller than the minimum lot of the broker, the trade is skipped: the EA never rounds up to the minimum lot on its own, because that would risk more than you chose. The panel and the journal tell you how many trades were skipped for this reason. With gold at record prices the ATR is large, so on a 10,000 USD account at 0.5% part of the signals can be skipped. You have three choices: use a larger balance (about 20,000 USD at 0.5%), raise the risk to 1%, or turn on Min Lot If Risk Too Small, which opens the minimum lot as long as its risk is not more than twice the risk you set.
With Use Risk Per Trade off, the EA trades the fixed lot of Volume Lots.
PROP FIRM PROTECTION
The drawdown protection is on by default and follows the rules most prop firms use.
Daily loss limit: 2% from the equity at the start of the trading day. When the equity falls 2% below that value, the EA closes its positions and makes no new trades until the next day. The day starts at 0:00 UTC by default and you can move it to match the reset time of your prop firm.
Total loss limit: 5% below the starting balance. When it is reached, the EA closes its positions and stops trading until you reset it. The starting balance is the equity when the EA is first attached, or the value you enter in Initial Balance, which is the right choice on a challenge account.
Equity drawdown from the peak: off by default. Turn it on for accounts with a trailing drawdown rule.
The state of the limits is saved in the terminal, so a restart of MetaTrader or of your VPS does not reset the daily or the total loss. To start again from zero, for example on a new challenge account, set Reset DD State to true once and then back to false.
Set the limits of the EA slightly tighter than the limits of your prop firm. The EA checks the equity on every tick, but a gap or a fast market can move price beyond a stop.
CHART PANEL
A panel on the chart shows the state of the EA (active, outside the session, Friday cutoff, limit reached), the daily and total result against the limits, the drawdown from the peak, the open positions, the number of trades, the last decision with the reason of a blocked signal, and the main settings. The journal records every trade and, when the EA is removed, a summary of how many signals each filter blocked.
STRATEGY TESTER RESULTS
These are backtest results on historical data with the default settings, XAUUSD H3, every tick based on real ticks, each period starting from a 10,000 USD balance. The exit settings were chosen on January 2024 to August 2025 only; the period from August 2025 to June 2026 was then run with the same settings, as an out of sample check.
January 2024 to August 2025, risk 0.5%: 181 trades, net profit 899 USD, profit factor 1.40, maximum equity drawdown 2.4%, 67% winning trades.
August 2025 to June 2026, risk 0.5%: 55 trades, net profit 297 USD, profit factor 1.44, maximum equity drawdown 1.6%.
January 2024 to August 2025, risk 1%: 184 trades, net profit 2,026 USD, profit factor 1.38, maximum equity drawdown 5.4%.
August 2025 to June 2026, risk 1%: 88 trades, net profit 1,194 USD, profit factor 1.57, maximum equity drawdown 4.0%.
The total loss limit never stopped the EA: in every test the lowest point of the equity was about 2% below the starting balance or less. At 0.5% the second period has fewer trades because, on a 10,000 USD balance, part of the signals needed less than the minimum lot and was skipped, as explained above.
Read the numbers for what they are. The EA trades about twice a week on H3, the average trade lasts about ten hours and the expected return is moderate: it is built to pass the rules of a challenge without large swings, not to double an account. About two thirds of the trades close in profit, but a full stop loss is larger than an average win, so losing streaks happen. Past results do not guarantee future results, and a live account has its own spread, slippage and execution.
GETTING STARTED
Attach the EA to an XAUUSD H3 chart and allow algorithmic trading. The default settings are the ones used in the results above. Start on a demo account for at least a few weeks and check in the panel that the lot size fits your account.
On a prop firm account enter the starting balance of the challenge in Initial Balance and set Daily Max Loss Percent and Total Max Loss Percent slightly below the limits of your prop firm. If the daily loss of your prop firm resets at a time other than midnight UTC, set Daily Reset Hour UTC to that hour.
Server time is detected automatically. If your broker uses an unusual server clock and the session hours shown in the journal look wrong, choose Fixed Offset in Server Time Mode and enter the offset of the server from UTC.
Use one chart per symbol, or a different Magic Number on each chart.
SETTING EXAMPLES
Default, accounts from about 20,000 USD: leave the settings as they are, risk 0.5%, daily limit 2%, total limit 5%.
Challenge with 5% daily and 10% total loss, 10,000 USD or more: Risk Per Trade Percent 1, Daily Max Loss Percent 4, Total Max Loss Percent 8, Initial Balance equal to the challenge balance. In the tests above risk 1% reached a 5.4% equity drawdown from the peak.
Account with a trailing drawdown of 5%: Risk Per Trade Percent 0.5, Max Equity DD Percent 4.
Small account where 0.5% is below the minimum lot: Min Lot If Risk Too Small on, or a fixed lot with Use Risk Per Trade off and Volume Lots 0.01.
Longs only: Entry Mode High Breakout Long.
FREQUENTLY ASKED QUESTIONS
Why H3 and not M5 like a classic scalper? The same rules were tested from M15 to H3, and H3 gave the most stable results in both periods. On lower timeframes the noise of gold hits the stops too often. You can still run it on other timeframes, but test them first.
Does it use grid, martingale or averaging? No. One position per direction, every trade with its own stop loss, and the lot depends only on the stop distance and on the risk you set.
Why did the backtest open few trades or none? Check the panel and the journal. The usual reasons are a balance too small for the risk (trades skipped for the minimum lot), a broker whose gold symbol has a different name or contract size, a session filter that does not match your server time, or a period with no trend. The summary at the end of the test shows how many signals each filter blocked. In the Strategy Tester only, when the balance is too small for the risk and no trade has been opened yet, the first trade of the test uses the minimum lot so that you can see the strategy at work; the journal says so, and on a live or demo account this never happens.
Can I use it on other symbols? It was developed and tested only on XAUUSD. Because all distances are in ATR it runs on any symbol, but test and optimize it on your own before trading another market.
Does it work on netting and hedging accounts? Yes. On a netting account it keeps one position at a time and never opens a trade against a position of another EA on the same symbol.
Do I need a VPS? The EA must run continuously to manage the trailing stop and the limits, so a VPS or a computer that stays on is recommended.
What happens after a restart? The state of the daily and total limits is restored, the open positions are recognized by the Magic Number and managed as before.
ALL PARAMETERS
General. Volume Lots: fixed lot used when Use Risk Per Trade is off. Max Positions Per Direction: 1 by default. Enable Trading: turns new entries on or off; open trades are still managed. Allow Opposite Same Bar: allows a long and a short on the same bar. Block Opposite While Open: no new long while a short is open, and the other way round. Magic Number and Order Comment identify the trades of the EA.
Units. Management Unit: ATR or Pips, the unit of the buffer, minimum body, break even, trailing and spike filter. Spread Unit: ATR or Pips for the spread filter. Pip Size, 0 Auto: the pip used by the pip settings; 0 detects it from the symbol.
Breakout. Entry Mode: High Breakout Long, Low Breakout Short or Both. Breakout Level: High Low of the previous bar, or its Close. Require Body Confirmation: the previous bar must close in the direction of the trade. Require Intrabar Cross: the current bar must open before the level. Breakout Buffer: extra distance beyond the level. Min Candle Body: minimum body of the previous bar, 0.1 ATR by default.
Spread Filter. Use Max Spread Filter and Max Spread, 0.3 ATR by default.
Session Filter. Use Session Filter, Session Start Hour UTC 8, Session End Hour UTC 16. Use Friday Cutoff, Friday Cutoff Hour UTC 20, Close Positions At Friday Cutoff.
Trend Filter. Use EMA Trend Filter, Fast EMA Period 8, Slow EMA Period 21, Slope Lookback Bars 2.
ADX Filter. Use ADX Filter, ADX Period 14, ADX Min Threshold 20.
Momentum Filter. Use RSI Momentum Filter, RSI Period 14, RSI Long Min 50, RSI Long Max 85, RSI Short Max 50, RSI Short Min 15.
Cooldown. Cooldown Seconds 30, Cooldown Only After Loss.
Exit. Exit Type: ATR by default, or Pips, Candle Close, Candle Close Pips. Emergency SL ATR Mult: the stop used in Candle Close mode, 2.0. Short Uses Long Values: shorts use the long values of stop, target, break even and trailing.
Exit Pips. SL Long Pips, TP Long Pips, SL Short Pips, TP Short Pips, used by the pip exit types.
Exit ATR. ATR Period 14, ATR SL Mult Long 1.6, ATR TP Mult Long 2.0, ATR SL Mult Short and ATR TP Mult Short, used when Short Uses Long Values is off.
Break Even. Use Break Even, BE Long Trigger 1.0, BE Long Protect 0.1, BE Short Trigger, BE Short Protect, in the management unit.
Trailing Stop. Use Trailing Stop, TS Long Start 1.2, TS Long Distance 0.5, TS Short Start, TS Short Distance, TS Step 0.1, in the management unit.
Volatility Filter. Use Volatility Spike Filter, Spike Min Move 0.8, Spike Lookback Seconds 3, Spike Block Seconds 30.
Risk Management. Use Risk Per Trade, Risk Per Trade Percent 0.5 (from above 0 up to 5), Min Lot If Risk Too Small: opens the minimum lot when the risk calculation gives less, as long as its risk is at most twice the risk set; off by default.
Drawdown. Use Drawdown Protection, Daily Max Loss Percent 2, Total Max Loss Percent 5, Max Equity DD Percent 0 (off), Initial Balance (0 uses the equity when the EA starts), Daily Reset Hour UTC 0, Persist DD State, Reset DD State.
Display. Show Panel, Panel Font Size.
Server Time. Server Time Mode: Auto, NY Close (GMT+2 in winter, GMT+3 in summer) or Fixed Offset. Fixed Server Utc Offset Hours: used with Fixed Offset.
Trading involves risk. Use the EA on a demo account first and only with money you can afford to lose.
