Small Inside Bar Strategy
Info
The Small Inside Bar Strategy is a Expert Advisor for MetaTrader 5 that the ea utilizes an indicator that identifies and displays the 'inside bar' price action pattern. This indicator is not essential for the EA's functionality, as it internally calculates the necessary data.
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 Small Inside Bar Strategy
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
The EA utilizes an indicator that identifies and displays the 'Inside Bar' price action pattern.
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: inside bar trading strategy - another powerful expert for MetaTrader 5 traders.
The EA utilizes an indicator that identifies and displays the 'Inside Bar' price action pattern. This indicator is not essential for the EA's functionality, as it internally calculates the necessary data.Also recommended: Martin Expert Advisor for Small Deposits - similar expert with strong performance on MetaTrader 5.
Upon detecting a bullish 'Inside Bar' pattern, the EA initiates a buy position, and for a bearish pattern, it opens a sell position. There are three distinct position-opening options:
- A relevant position is opened for each signal, and positions are closed by stop loss or take profit.
- A relevant position is opened for each signal, while opposite positions are closed (refilled swing).
- A relevant position is opened at a signal, provided no existing position in the opposite direction, and the opposite position is closed (swing).
The EA offers the flexibility to disable buy/sell activities and includes a reverse mode, allowing sell positions to be opened at buy signals and vice versa.
It's important to note that if the mode of opening all positions at all signals is selected and no stop loss or take profit levels are set, the EA cannot close positions independently. In such cases, a warning will be displayed on the chart, indicating the absence of preset take profit or stop loss, and manual position closure will be required. This expert advisor is designed for training purposes.
The EA incorporates twelve input parameters:
- Experts Magic Number: A unique identifier for the EA's positions.
- Mode of Opening Positions: Position opening mode.
- Any Position on Each Signal: Open any position at each signal.
- Positions on Each Signal in One Direction (Swing with Refill): Open multiple positions in one direction (refilled swing).
- Always One Position (Swing): Maintain only one position (swing).
- Long Positions Enabled: Enable opening long positions (yes/no).
- Short Positions Enabled: Enable opening short positions (yes/no).
- Reverse Trade: Enable reverse transaction mode (yes/no).
- Lots: Position opening volume.
- Stop Loss in Points: Stop loss value in points (0 means no stop loss).
- Take Profit in Points: Take profit value in points (0 means no take profit).
- Slippage of Price: Maximum allowable slippage when opening a position.
- Multiplier Spread for Stops: Spread multiplier for calculating the distance for stop orders.
- Waiting for Environment Update (in seconds): Time to wait for trading environment updates.
- Number of Attempts to Get the State of the Environment: Number of attempts to obtain accurate environment information.
For pending orders (stop loss or take profit), there is a minimum allowed distance for placing stop orders, known as 'Stoplevel'. This distance cannot be less than the specified value. If 'Stoplevel' is zero, it indicates a floating value, and the minimum distance is typically spread*2. However, the EA introduces a custom spread multiplier to calculate the minimum distance for pending orders.
To ensure accurate environment updates, the EA waits for the specified time and then reads the environment again. If the environment remains undefined after all allowed attempts, the EA exits processing and waits for the next tick, repeating the process if the environment hasn't updated.
The default settings were tested using EURUSD H1 in the 1-minute OHLC mode from 2026.01.04 to 2026.03.29. Subsequently, stop loss and take profit values were optimized for the same time interval. The optimal stop loss is 800 points, and the optimal take profit is 900 points.
You may also like: simple three inside pattern ea - 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.