Any EA
- Uzman Danışmanlar
- Fernando Lahude Ritter
- Sürüm: 1.1
- Güncellendi: 18 Nisan 2025
- Etkinleştirmeler: 5
Any EA is a generic MQL5 Expert Advisor that dynamically loads any custom indicator whose output values map directly to entry/exit signals:
-
Buy Market when indicator value ≃ BuyValue
-
Sell Market when indicator value ≃ SellValue
-
Zero Position when indicator value ≃ ZeroValue
By passing its parameters as a simple string (e.g. "{14}{2.0}{0}" ), you stay agnostic to indicator type and version.
Input | Type | Default | Desc |
---|---|---|---|
Indicator Name | string | Empty. If you leave empty a embeded crossing average strategy will be loaded that has Buy Value 1, Sell Value -1 e Zero Value 2 | The indicator name the must be on the Indicators MQL5 folder, If is inside a subfolder include ${SubFolder}\IndicatorName |
Buy Condition | ENUM | Equal. | How the EA should analyze the Buy Market Signal Value {==, !=, >, >=, <, <=,} |
Buy Market Signal Value | int | The value your custom indicator outputs that signals a buy at market | |
Sell Condition | ENUM | Equal. | How the EA should analyze the Sell Market Signal Value {==, !=, >, >=, <, <=,} |
Sell Market Signal Value | int | -1 | The value your custom indicator outputs that signals a sell at market |
Zero Condition | ENUM | Equal. | How the EA should analyze the Zero Signal Value {==, !=, >, >=, <, <=,} |
Zero Signal Value | int | 2 | The value your custom indicator outputs that signals a zero position |
Signal Buffer Index | int | 0 | The indicator buffer index that holds the signal values |
Indicator Parameters | string | "{6}{0}{3}{1}{200}{0}{3}{1}" This default value is for the embeded Crossing Average strategy {Fast Per.}{Fast Shift}{Fast Mod.}{Fast Price}{Slow Per.}{Slow Shift}{Slow Mod.}{Slow Price} | The parameters of the indicator (see below) |
Add Indicator to the chart | bool | false | Whether you want to add the indicator to the chart |
Indicator Subwindow | bool | false | If the indicator is for the subwindow (only relevant is Add Indicator to the Chart is TRUE) |
Parameter Parsing Rules
-
The string is scanned for {…} blocks.
-
If the contents contain only digits → int .
-
If they contain a dot ( . ) → double .
-
Otherwise → string .
Example Usage (with Enum)
Suppose your indicator takes:
-
period (int)
-
method (enum: 0=Simple, 1=Exponential)
-
applyTo (enum: 0=Close, 1=Open, 2=High, 3=Low)
The EA Indicator Parameters should be "{14}{0}{0}"
Now Suppose your indicator takes:
-
period (int)
-
dev(double)
-
tag(string)
The EA Indicator Parameters should be "{20}{2.0}{'BB'}"
To mark a double you should use the "." like in 2.0 and strings are between quotes ' ', 'MyStringInput'
This Robot Supports a ton of configurations that does not fit in this description, you can contact me for the full User Manual or Access Here GTR User Manual.
TIPS:
- Enable the attachment of the indicator to the chart, them you can make sure your parameters were corretcly inputed
- If an indicator has input "group" (the MQL input pretty headers) you have to also pass them to the EA with any value e.g
MAIN INPUTS -> input group
Period = 9
Dev = 2.0
Them the Indicator Parameters should look like {AnyValue}{9}{2.0}. This must be done that way due to the design of the MQL5 language - If you bought some indicator from the market, or has an indicator that you do not have access to the source code but can be used in this EA, make sure
to look at an .set for the indicator. That way you can now exactly how ENUM inputs from that indicator can be mapped.
- This EA can hold only a single position at the time. Multiple calls to buy on an already bought position will be blocked. The opposite is also valid.
- Calling Sell while on a Long Position will firtst Zero the current position an open another one in the Sell Side. The opposite is also valid.