Lock
Info
The Lock is a Expert Advisor for MetaTrader 5 that suppose a trader enters the market with buy and sell positions on an asset at a currency level of 100. When the price moves to 200, buying at 100 is profitable, while selling at the same level results in a loss.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Lock
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
Suppose a trader enters the market with buy and sell positions on an asset at a currency level of 100.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Account Guard: EA Account Locking for MT5 - another powerful expert for MetaTrader 5 traders.
Suppose a trader enters the market with buy and sell positions on an asset at a currency level of 100. When the price moves to 200, buying at 100 is profitable, while selling at the same level results in a loss. Closing the buy position yields a profit of 100.Also recommended: Broker Clock Auditor: Accurately Track Server Time and Daylight Saving Shifts - similar expert with strong performance on MetaTrader 5.
When using a grid strategy, ensure profitability regardless of market direction. Re-enter buy and sell transactions, and assume the price moves back to 100. The repeated selling results in a profit of 100, while the second buying leads to a loss of 100. Closing the sell position adds another 100 to the account, resulting in a total profit of 200.
The first sell position, which remained active, moves from level 200 to 100, reaching the breakeven range.
Summing up the four transactions:
- First buy: +100
- Second sell: +100
- First sell: 0
- Second buy: -100
The total profit is 100. At this point, you can close all orders.
Before each subsequent double opening (simultaneous buy and sell), increase the lot size by the factor of 'Lot Exponential'.
Various market movements can make these seemingly complex strategies profitable. However, there is a risk of 'hanging' positions, which incur high losses and have opening prices far from the current price. To address this, two parameters are introduced:
- Excess of Balance Over Equity: Balance exceeding equity.
- Minimum Profit: Ensures a minimum profit level.
Input Parameters:
- Lots: Initial lot.
- Take Profit: Take profit level.
- Lot Exponential: Lot increase ratio.
- Excess of Balance Over Equity: Balance exceeding equity.
- Minimum Profit: Minimum profit threshold.
- Magic Number: Unique identifier for the EA.
You may also like: SMC Gold EA: Smart Money Concepts for XAUUSD M15 with Liquidity Sweep and Order Blocks - excellent alternative for expert users on MetaTrader 5.
Source Code
/
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.