I remember when I first started Studying Forex Trading and short after I decided that I wanted to automate my trading as much as possible.
We live in a modern era where computers can provide a great help in trading systems development and implementation.
When you are developing a trading system and looking for possible entry and exit rules it is very useful to see a visual representation of when these rules would be applied.
At the same time, if you are already trading a system you don’t want to miss trades and you want to get alerts when your entry or exit triggers.
The MT4 Alert Indicator Template is the basic template for the development of my alert indicators.
It includes the basic workflow and functions of an indicator WITHOUT entry and exit signals.
You can add your own entry and exit signals and run it.
I can guarantee this source code will significantly reduce the time you spend developing an Alert Indicator.
What Is MT4 Alert Indicator Template
MT4 Alert Indicator Template is 350+ lines of commented source code that you can use to build your own Indicator and Alerts.
The code is explained so you can understand it’s logic.
You can customise portions of the code to achieve your entry and exit signal and have an Indicator ready to use.
What Does MT4 Alert Indicator Template Include
What MT4 Alert Indicator Template IS NOT
MT4 Alert Indicator Template IS NOT a fully automated strategy.
Although we include some finished examples to download with this template, these are only to show the potential of the code and as examples.
You will need to add to the template your own Entry or Exit signal code in order to have it fully operational.
Why Using MT4 Alert Indicator Template
What Is The Logic Of An Indicator
All Indicators are divided in 3 main functions:
- OnInit is the initialization of the Indicator, the first function that runs when you load an EA
- OnCalculate runs every time MT4 receives a new quote for the current instrument
- OnDeinit runs just before closing the Indicator
Modules Included In MT4 Alert Indicator Template
MT4 Alert Indicator Template is written in a modular way so that all the functions are separate.
This allows to have a source code easier to read and to understand and also makes it easier to customise the code.
Here you see how the functions are separated in the execution.
What Do You Need To Use MT4 Alert Indicator Template
Although most of the code is provided and commented, you need to be able to add your own code for the Entry and Exit signals.
I provide some examples together with the code and in my blog articles.
The files included to download are for the MT4 platform and only work on the MT4 platform.
It is advisable to be familiar with compilation, which is understanding that this product is source code to be edited in the MetaEditor and compiled to a working EA through the platform.
I would like to remind that this is not a fully working trading strategy.
You will have to include your own entry and exit signals and strategy.
From The Source Code
These are some extracts from the code.
This is a good way to understand if the product is suitable for you.
If what you see makes sense then I am sure it will significantly help you.
If it doesn’t make sense but you are interested in see how the code for an Alert Indicator works then this can help you.
If you are not the coding type of person and all this doesn’t interest you, then probably this is not something for you.
If you are interested in a more basic course to start programming in MQL4 let me know and I will put together a beginner course.
How To Install MT4 Alert Indicator Template
- Download The Files
- Open the MQL4 Folder, from MT4 Client click File -> Open Data Folder
- Copy the icon in the Files folder
- Copy the .mq4 files in the Indicators folder
- Open the files with Metaeditor
How To Use It
Customise the following functions in order to complete the signals:
- Add the input parameters for your entry or exit
- OnInitPreChecksPass contains the code to check the validity of the input parameters, you can add your checks here
- Add to the IsSignal function your data to evaluate and the entry or exit rules
Fully Working Examples Provided
Together with the template you can download some fully functional Alert Indicators so you can see how the code has been customised.