Inner Bar Breakthrough Trend Following Trading Signal Module
Info
The Inner Bar Breakthrough Trend Following Trading Signal Module is a Library for MetaTrader 5 that this module offers a flexible approach to strategy creation by allowing the use of different components. For instance, the core strategy logic can be developed by one programmer, while modules for money management and trailing stops can be created by others.
Usage
This tool is typically used for trend following strategies across multiple currency pairs.
Platform
This Library works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Libraries folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Inner Bar Breakthrough Trend Following Trading Signal Module
1. Storage: Place library files in the MQL/Libraries directory to ensure they are accessible to your projects.
2. Implementation: Include the library in your code using the #import directive, ensuring you match the exact function names and parameters.
3. Compilation: Ensure the library is present in the directory before you compile your main EA or script, as the compiler links them during this phase.
4. Management: Keep libraries organized in sub-folders if you manage many custom functions to maintain a clean project structure.
Frequently Asked Questions
Q: What is a library file used for? A: Libraries store reusable code modules, allowing you to centralize common logic used by multiple EAs or indicators.
Q: Is a library executable? A: No, libraries are non-executable files containing functions; they must be imported into an EA, indicator, or script to function.
Q: Can I update a library while the platform is running? A: You should compile your EA or script after updating a library to ensure the latest code changes are integrated.
What this tool does
This module offers a flexible approach to strategy creation by allowing the use of different components.
Typical Use Case
This Library excels in trend following on MetaTrader 5.
Compatible Platform & Setup
This Library works on MetaTrader 5. Place the file in the MQL5/Libraries folder and restart the terminal.
Description & Settings
Related: nel o d i back prop chart - another powerful library for MetaTrader 5 traders.
This module offers a flexible approach to strategy creation by allowing the use of different components. For instance, the core strategy logic can be developed by one programmer, while modules for money management and trailing stops can be created by others.Also recommended: Stochastic Oscillator Calculation on Arrays - similar library with strong performance on MetaTrader 5.
The strategy implemented in this module operates as follows: when an outside bar forms, it detects if an inner bar breakthrough has occurred in the trend direction, generating a signal to open a position. An outside bar is defined as a bar with a higher high and a lower low than the preceding bar. A breakthrough signifies that the price has surpassed the extreme of the inner bar.
The trend direction is determined by the color of the outside bar. A position is opened upon the completion of a bar that generates a signal.
Example of a signal to open a long position:
Description of signals
To integrate this module, copy the 'innerbarsignal.mqh' file to the 'mql5\include\expert\signal\mysignal' directory.
Following a MetaEditor restart, the module will be available in the MQL5 Wizard.
Module of trade signals in MQL5 wizard
History backtesting results (EURUSD, D1, 2010-2026):
Testing results
Input parameters:
takeprofit = 300;
stoploss = 300;
trailing stop = 100.
You may also like: calculate lot by percent - excellent alternative for library users on MetaTrader 5.
Source Code
#property copyright "robotfx"
#property link "https://robotfx.org"
#property version "1.00"
#include <expert\expert.mqh>
#include <expert\mysignals\innerbarsignal.mqh>
#include <expert\trailing\trailingfixedpips.mqh>
#include <expert\money\moneyfixedlot.mqh>
input string expert_title ="test_innerbarsignal"; // document name
ulong expert_magicnumber =8167; //
bool expert_everytick =false; //
.......
⚠ 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.