Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Category of trading signals module, "Inside Bar Breakout" regarding trend direction - MetaTrader 5 Library - MT4/MT5 Resources

author EAcpu | 2 reads | 0 comments |

The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

This MQL5 Wizard provides the opportunity to create strategies using different modules. For example, the main module can be written by a developer, and other modules (money management, trailing stops) can be developed by other programmers.

The strategy implemented in this module is as follows: when an external bar appears, it checks the fact that the internal bar broke in the direction of the trend and generates a signal to open a position. An outer (outer) bar is a bar where the high price is greater than the previous bar's high price and the low price is lower than the previous bar's low price. A "breakout" is an extreme crossover of an inside bar.

The direction of the trend depends on the color of the outer bar. A position is opened after the bar is completed and a signal is given.

Example of signals for opening a long position:


The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

Signal description

To use this module, copy innerbarsignal.mqh to MQL5\Include\Expert\Signal\Mysignal.

After restarting MetaEditor, this module will appear:

The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

Trading signals module in MQL5 Wizard

Historical backtest results (EURUSD, D1, 2010-2011):

The class of a module of trade signals, on "inner bar breakthrough" in trend direction - library for MetaTrader 5

Test results

Input parameters:


Attachment download

📎 innerbarsignal.mqh (3.47 KB)

📎test_innerbarsignal.mq5 (6.85 KB)

Source: MQL5 #358

Verification code Refresh