Contents
Today we will talk about easy ways to connect the Scalper Inside PRO indicator to custom EA’s. Since v3.59 it is even easier now because of the new system of presets.
So let’s begin. Why do we need to connect the indicator to the Expert Advisor? The most basic application is of course the possibility of automatic or semi-automatic trading. It is also possible to create some additional visual control panels and other possibilities. I would like to point out right away that the following data requires a certain level of programming.
Scalper Inside PRO
Product URL: ScalperInsidePRO
Testimonials: Read More…
Current Version: v6.71
Trading Platform: MetaTrader 4
Recommended Broker: Read More…
As we know, the main way to call the indicator out of the Expert Advisor is to use the iCustom function, which lists all the necessary parameters that will be used in the indicator:
External Buffers of the Scalper Inside PRO indicator
To begin with, let’s remember what external buffers should be used in the EA when calling the Scalper Inside PRO indicator (since v6.4):
[1] – Sell Signal
[2] – Open Price
[3] – TP1
[4] – TP2
[5] – TP3
[6] – SL
[7] – TP1 WR%
[8] – TP2 WR%
[9] – TP3 WR%
[10] – HTF-Filter Value
[11] – HTF-Filter Buy Trailing Value
[12] – HTF-Filter Sell Trailing Value
A Classic Way to Call the Scalper Inside PRO Indicator from an EA
The following example will call the indicator with the default settings (since it is run for the first time in the terminal):
double BuyBuffer = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4","-",0,1);
double SellBuffer = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4","-",1,1);
double HTF-filter = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4","-",10,1);
But if you need to run the indicator with your settings, you should list them all sequentially, as it is stated in the description to the iCustom function.
For example:
double BuyBuffer = iCustom(_Symbol,0,indicator_name,"-",EntryStrategy,Sensitivity,0,1);
double SellBuffer = iCustom(_Symbol,0,indicator_name,"-",EntryStrategy,Sensitivity,1,1);
So if you need to change numerous variables to start the indicator, you get quite long strings to call it.
To simplify this process, starting with the new v3.59 version of the Scalper Inside PRO indicator, a system of presets has been added.
Simplified Call of the Scalper Inside PRO Indicator from an EA with Preset
Suppose you have already set the settings that you are happy with – you did it manually or using the automatic optimization module built into the indicator.
Open the extended panel and click the ‘SAVE PRESET’ button:
After that, the preset will be saved in global variables and will be available after restarting the terminal until it is reset with the ‘CLEAR PRESET’ button.

Pressing the ‘SAVE PRESET’ button automatically overwrites the previous preset with the new one, and we have no need to clear the preset additionally.
If you change your mind about using a preset for some reason, press the ‘CLEAR PRESET’ key to delete the preset data from memory.
Now, calling the indicator from the EA is simplified to the following code:
string work_mode = "3";
double BuyBuffer = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4",work_mode,0,1);
double SellBuffer = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4",work_mode,1,1);
double HTF-filter = iCustom(_Symbol,0,"/Market/Scalper Inside PRO.ex4",work_mode,10,1);
There is no need to list all the other variables, since they will be loaded from the preset.
Indicator Work Modes
In total, we have 4 modes of operation of the indicator, when calling it from the EA.
MODE 1 – Panel ON – Preset NOT USED:
MODE 2 – Panel OFF – Preset NOT USED:
MODE 3 – Panel ON – Preset USED:
MODE 4 – Panel OFF – Preset USED:
Then the data is reading by the EA and processed already inside the EA, according to your strategy or the way the indicator is applied. Note: this process requires some skills in developing EA and trading systems.
The official documentation about the MQL4 programming language: book.mql4.com