GoldScalper Script
Category: Utilities (Script)
Version: 1.00
Author: Alfred Jaftha
Product Type: MQL5 Script
GoldScalper Script is a one‑click pending‑order generator for XAUUSDm, designed to lock in potential scalping entries based on H1 trend confirmation and M1 Bollinger Bands/ATR levels. Unlike an EA, this script executes a single trade setup when launched, making it ideal for traders who prefer manual control combined with algorithmic precision.
Trend Confirmation: Uses H1 EMA50 and EMA200 crossover to determine bullish or bearish bias.
Entry Calculation: Places a BUY_STOP above the upper Bollinger Band or a SELL_STOP below the lower Bollinger Band on M1, with configurable ATR‑based offset.
Risk Management: Computes lot size based on equity and a user‑defined RiskPercent, with optional enforcement of minimum lot size.
Stop‑Level Compliance: Ensures pending price, SL and TP respect broker’s minimum stop‑level distance.
Customizable Parameters: All inputs (ATR period, multipliers, Bollinger settings, slippage, etc.) are exposed as script inputs.
Single‑Run Execution: Launch once to place one pending order; clean up of indicators occurs automatically.
| Parameter | Description | Default |
|---|---|---|
| RiskPercent | % of equity risked per trade | 1.0 |
| MaxLot | Maximum lot size | 0.1 |
| ATRPeriod | ATR look‑back period (M1) | 14 |
| SlMultiplier | SL distance = ATR * multiplier | 3.0 |
| TpMultiplier | TP distance = ATR * multiplier | 5.0 |
| BBPeriod | Bollinger Bands period (M1) | 20 |
| BBDeviation | Bollinger Bands deviation | 2.0 |
| OffsetMultiplier | Entry offset = ATR * multiplier | 0.5 |
| UseTrailing | (Script) Not used | – |
| TrailStartMultiplier | (Script) Not used | – |
| TrailStepMultiplier | (Script) Not used | – |
| PendingTimeout | Pending order expiration in seconds | 3600 |
| MagicNumber | Unique identifier for the order | 20250508 |
| MaxSlippagePoints | Maximum slippage allowed (points) | 5.0 |
| UseMinLotOnly | Force minimum lot only | true |
In MetaTrader 5, navigate to the Scripts folder under Navigator.
Drag & drop GoldScalperScript onto an XAUUSDm M1 chart.
Configure any input parameters in the dialog that appears.
Click OK to run; a single pending order will be placed according to the script logic.
Note: The script only executes on XAUUSDm and chart timeframe M1. If launched elsewhere, it will abort with an informational message.
Copy GoldScalperScript.mq5 into your \MQL5\Scripts\ directory.
Compile in the MetaEditor.
Reload or restart MT5 to see the script under Navigator > Scripts.
v1.00 (2025‑05‑12) — Initial release as a one‑click pending order script, with stop‑level enforcement and trend/entry logic.
Disclaimer: Trading involves risk. Past performance is not indicative of future results. Use this script at your own risk and always test on a demo account first.
If for any reason you do not like the purchased program, you can request a refund within 30 days from the date of purchase. You can also make an exchange for any other product at an equal cost or by paying the difference.
Simply send a request for refund or exchange with your order number by email: [email protected].
Refund requests received more than 30 days after purchase will be rejected.