Scalping BTC - User and Optimization Guide
This guide explains how to install, configure, use, and optimize Scalping BTC in MetaTrader 5. You can start with the default settings and later create a configuration adapted to your broker and preferences.
Minimum capital: USD 100. Use the same deposit, leverage, and symbol specifications in the Strategy Tester that you plan to use on your trading account.
Buy Scalping BTC on the MQL5 Market
Recommended Broker
Scalping BTC can be used with any broker that offers BTCUSD on MetaTrader 5. I personally recommend IC (IC Markets).
This is the author's referral link. BTCUSD specifications, including spread, commission, contract size, leverage, and minimum volume, may vary depending on the broker entity, account type, and client location. Use the specifications available on your account when running backtests.
1. Before You Begin
- Platform: MetaTrader 5.
- Symbol: BTCUSD or the equivalent Bitcoin symbol offered by your broker.
- Recommended chart: M1. The EA uses M1 data for its main calculations.
- Minimum capital: USD 100.
- Use a stable VPS if you want to keep the EA running continuously.
- Enable Algo Trading and allow algorithmic trading in the EA properties.
- Make sure the symbol is available for trading and that sufficient M1 history has been downloaded.
- Use a different Magic Number for each EA instance.
2. Installation and Setup
- Open MetaTrader 5 and log in to the account where you want to use the EA.
- Open your broker's BTCUSD symbol and select the M1 timeframe.
- Drag Scalping BTC from the Navigator onto the chart.
- On the Common tab, allow algorithmic trading.
- On the Inputs tab, use the default settings, load a SET file, or enter your preferred values.
- Make sure the Algo Trading button in MetaTrader 5 is enabled.
- Check the EA dashboard and the Experts log to confirm that it is running correctly.
Recommendation: Avoid changing the inputs while a basket is open.
3. How the EA Manages Trades
Scalping BTC evaluates the market automatically, opens trades only when its conditions are met, and manages related positions as a single basket. When appropriate, it can add support positions and update the basket's exit levels.
The EA does not use a manually entered fixed lot. It calculates the volume automatically according to the reference balance, configured target, current symbol conditions, and existing positions. This simplifies the initial setup and allows trade management to adapt to each cycle.
The EA keeps only one trade direction within a basket: Buy or Sell, but not both at the same time.
4. Input Parameters
Main Settings
| Input | What It Controls | Practical Effect |
|---|---|---|
| Allowed Trade Direction | Allowed direction: Both, Buy Only, or Sell Only. | Both allows Buy and Sell baskets. Buy Only allows only Buy baskets. Sell Only allows only Sell baskets. Changing this input does not close an existing basket. |
| Profit Target (% of balance) | Basket profit target expressed as a percentage of the reference balance. | 0.3 means 0.3%, not 30%. A higher value targets more profit per cycle and also affects the volume calculated by the EA. |
| Global Stop Loss (% of balance) | Basket loss limit expressed as a percentage of the reference balance. | 0 disables it. A positive value sets and updates a physical Stop Loss for the managed positions. |
| Entry Volatility Sensitivity | The sensitivity required to accept a new entry. | Lower values generally produce more opportunities. Higher values make entries more selective. This value is not expressed in points or dollars. |
| Rescue Volatility Step Factor | The volatility requirement applied to support positions. | Lower values may add positions more frequently. Higher values generally create more separation between support positions. |
| Target Volatility Expansion Ratio | The ratio used to determine the recovery target distance. | Higher values generally place the target farther away and affect the calculated volume. Lower values bring the target closer. Evaluate it together with Profit Target. |
| Volatility Calculation Period | The number of bars used to measure recent volatility. | Short periods react faster. Longer periods provide a smoother and more stable measurement. |
| Minimum Minutes Between Rescue Orders | The minimum time between one position and the next support position. | A lower value allows the EA to act more frequently. A higher value leaves more time between positions. |
| Market Swing Detection Window | The size of the window used to evaluate relevant market movement. | Lower values react to more recent movement. Higher values evaluate a broader market window and generally produce fewer signals. |
| Max Positions in Basket | The maximum number of positions allowed in a basket. | 0 means that no limit is configured. If a positive limit is reached, the EA will not add more support positions. |
| EA Magic Number | The unique identifier used to manage the positions opened by this EA instance. | Do not optimize this input. Use another number for a second instance or a different configuration. |
Display
| Input | Function |
|---|---|
| Show on-chart display | Shows or hides the information dashboard. It does not change the trading logic. |
| Dashboard background | Sets the dashboard background color. |
| Main text | Sets the main text color. |
| Accent color | Sets the color used to highlight dashboard elements. |
| Start in compact mode | Starts the dashboard in compact mode. |
| Refresh interval (milliseconds) | Controls how often the dashboard is refreshed. It is not a trading input. |
| Dashboard corner | Selects the chart corner used to position the dashboard. |
| X distance from corner | Sets the horizontal distance from the selected corner. |
| Y distance from corner | Sets the vertical distance from the selected corner. |
Display parameters should not be included in an optimization.
5. Recommended Initial Configuration
For the first installation, start with the default values. The default configuration provides a simple starting point and can later be adjusted in the Strategy Tester.
Scalping BTC lets you customize the trade direction, profit target, frequency of support positions, maximum number of positions, and Global Stop Loss. This makes it possible to create more conservative or more dynamic configurations according to your preferences.
6. How to Optimize Scalping BTC
6.1 Strategy Tester Settings
- Open the Strategy Tester by pressing Ctrl+R.
- Select Scalping BTC and your broker's exact BTCUSD symbol.
- Select the M1 timeframe.
- For modeling, select 1 minute OHLC. This is the recommended mode for optimization and significantly reduces processing time.
- Select the testing period you prefer. The longer the optimization window, the more time the optimization process will take.
- Set a deposit of at least USD 100, use the same account currency, and select the leverage you plan to use.
- Select Fast genetic based algorithm.
- For the optimization criterion, select Custom max. The EA includes a custom criterion that evaluates profitability, drawdown, and trading activity together.
- The initial search can be run without Forward to use the full period. After selecting the best results, run a second test with Forward 1/3 or with a later period that was not used for optimization.
Time-saving tip: Keep Global Stop Loss = 0 during the initial search. This makes the optimization faster. You can then test the best configurations with different Global Stop Loss values and select the one you prefer.
6.2 Suggested Optimization Ranges
The following ranges have been prepared as a starting point for Scalping BTC. In MetaTrader 5, enable only the optimization boxes indicated below.
| Input | Value | Start | Step | Stop | Optimize |
|---|---|---|---|---|---|
| Allowed Trade Direction | Buy Only | Both | One option | Sell Only | Yes |
| Profit Target (%) | 0.3 | 0.2 | 0.1 | 0.8 | Yes |
| Global Stop Loss (%) | 0 | 5 | 5 | 100 | No |
| Entry Volatility Sensitivity | 16 | 1 | 1 | 20 | Yes |
| Rescue Volatility Step Factor | 16 | 1 | 1 | 20 | Yes |
| Target Volatility Expansion Ratio | 5.5 | 1 | 0.5 | 10 | Yes |
| Volatility Calculation Period | 12 | 5 | 1 | 30 | Yes |
| Minimum Minutes Between Rescue Orders | 45 | 15 | 15 | 120 | Yes |
| Market Swing Detection Window | 70 | 20 | 10 | 100 | Yes |
| Max Positions in Basket | 0 | 0 | 1 | 10 | No |
For Allowed Trade Direction, MetaTrader 5 will test all three options: Both, Buy Only, and Sell Only. Keep EA Magic Number and all Display inputs fixed.
In the initial optimization, keep Global Stop Loss fixed at 0 and Max Positions in Basket fixed at 0. Their optimization boxes should remain disabled during the initial search. This reduces the number of combinations and speeds up the optimization.
6.3 Optimization by Stages
With Fast genetic based algorithm, you can optimize all inputs marked “Yes” in the table at the same time. If your computer is slower, you want to study the influence of each group, or you want to refine a promising area, use the following stages:
- Entries: Optimize Entry Volatility Sensitivity, Volatility Calculation Period, and Market Swing Detection Window. Keep the other inputs at their default values.
- Basket management: Keep the best previous values and optimize Rescue Volatility Step Factor, Minimum Minutes Between Rescue Orders, and Max Positions in Basket.
- Target: Optimize Profit Target and Target Volatility Expansion Ratio.
- Final adjustments: Test Global Stop Loss separately from 5% to 100% in steps of 5. If you want to limit the number of positions, test Max Positions from 1 to 10. Compare profit, drawdown, recovery, and stability.
- Refinement: Narrow the range around the best areas and use smaller steps. Look for groups of neighboring configurations with similar behavior instead of selecting one isolated result.
6.4 How to Select a Result
Do not automatically select the row with the highest profit. A useful configuration should show:
- positive profit in both the optimization and forward results;
- reasonable drawdown for the selected configuration;
- enough trades to make the result representative;
- sufficient free margin during the test;
- final equity close to the final balance;
- stable results across neighboring configurations;
- reasonable behavior when the testing period is changed.
A balanced and consistent configuration is generally preferable to one that stands out only because it has the highest profit.
6.5 Final Validation
- Run an individual backtest of the selected configuration using 1 minute OHLC.
- Repeat the test using Every tick based on real ticks. This test is slower, but it provides a useful final check with historical spread and tick data.
- Test a period different from the one used for optimization.
- Confirm that the forward result remains acceptable.
- Repeat the test with the deposit and leverage you plan to use.
- Run the configuration on a demo account before using it on a live account.
- Click Save on the Inputs tab to create your SET file.
OHLC and real-tick tests do not need to produce identical figures. Use the real-tick test as the final confirmation of the selected configuration.
7. Frequently Asked Questions
What is the minimum capital?
The minimum capital is USD 100. Run a backtest with the exact deposit and leverage you plan to use to confirm the configuration on your broker.
What does Profit Target = 0.3 mean?
It means an approximate basket target of 0.3% of the reference balance. It does not mean 30%.
What does Global Stop Loss = 0 mean?
A value of 0 disables the Global Stop Loss. If you want to use this limit, enter your preferred percentage and evaluate it in a backtest.
Why does the lot size change?
The EA calculates volume automatically according to the configuration, account balance, symbol conditions, and current basket. The user does not enter a fixed lot size.
Why do results vary between brokers?
BTCUSD may have different spreads, contract specifications, commissions, swaps, minimum volumes, tick values, and historical data depending on the broker. Optimize and validate the EA using the data from the broker you plan to use.
Can I change the chart timeframe?
The EA uses M1 data internally. Keeping it on an M1 chart is recommended for clarity and easier monitoring.
Can I close a position manually?
It is recommended to let the EA manage the complete basket. Closing one position manually changes the group of trades and may alter the expected result.
Can I use the same Magic Number on two charts?
It is not recommended. Each EA instance should use a unique identifier so that one configuration does not recognize another instance's positions as its own.
8. Checklist Before Trading
- Correct BTCUSD symbol and M1 chart.
- Algo Trading enabled.
- Minimum capital of USD 100.
- Deposit and leverage checked in the Strategy Tester.
- Configuration validated with the current broker.
- Unique Magic Number.
- Global Stop Loss reviewed; 0 means disabled.
- Profit, drawdown, margin, and forward results reviewed.
- Final real-tick test and demo test completed.
- Stable VPS and connected terminal.
9. Risk Notice
Trading involves risk, and past results do not guarantee future performance. Test the configuration before using it on a live account and trade only with capital that is appropriate for you. The user is responsible for the configuration and use of the EA.
Guide for Scalping BTC v1.00. If a future version changes the inputs or management system, consult the latest documentation.


