Categories
News Room


1. Introduction

Emerald EA Builder, as the name states, is an EA Builder (Expert Advisor Builder) that provides a wide set of indicator and price action signals so you can quickly develop your own strategies for Forex, Stocks, Futures, and any other market you wish.

Tired of buying scam EAs in the market? Just easily create your own strategy with a single Expert Advisor. 

By combining the more of 20 available indicators and 10 price action signals, including the possibility to add your own custom indicators, Emerald EA Builder allows the user to create an inifinity of strategies. That is, the EA is helpful for people who don’t code, in a sense that you don’t need to know MQL5 to create strategies around the built-in or custom indicators. At the same point, the EA is helpful for coders, because it simplifies the process, so you don’t need to code a thousand of EAs everytime you build a new strategy.

The main goal is to provide a quick, safe and easy to use Expert Advisor. That’s why a 4-year optimization period should normally take around a few minutes to complete (1 minute OHLC or Open Prices modelling), considering a 8-core CPU.

This introduction guide will present you some of the EA functionalities and exemplify how you can create a simple strategy.

2. How the EA works?

This EA evaluates every condition at the first tick of a new bar. Tha last bar closed is indexed as 0, the second to last is the bar 1, and so on.

The following image represents the candle order:

So when the bar 0 closes, on the very first tick of the next one, the EA checks if the defined conditions were met to open a long/short position. This concept is important to create strategies.

After that, the EA provides many important time, signals and risk management functions for your strategy. Let’s keep it simple for this one: we’ll create a strategy based on two moving averages crossover that can only open trades between 10 a.m. (start time) and 5 p.m. (end time). If there’s still at least one position open after 7 p.m., all positions should be closed (close time).

The take profit will be defined as 3x the Standard Deviation from the current price level. The stop loss will be 1x the Standard Deviation from the current price level. 

We also want that the strategy is allowed to open multiple positions at a time.

To do this, the following parameters must match the values in the table below:

Group Parameter Value
[0] Expert Advisor [EA] Magic Any numerical value
[1] Trading Settings [Settings] Trading mode Multi position
[1] Trading Settings [Settings] Global timeframe Any predefined value. If set to current, the EA will be run on the Strategy Tester defined timeframe. If set to anything else than current, its highly recommended that you set the Strategy Tester timeframe to M1 and set the modelling to ‘Open Prices’ (faster – preferrably) or ‘1 minute OHLC’ (a bit slower, but slightly more accurate).
This sets the timeframe for every indicator where their own timeframe is set to current and also the period at which new bars are evaluated.
I’ll leave it to current.
[1] Trading Settings [Settings] Use start time True
[1] Trading Settings [Settings] Use end time True
[1] Trading Settings [Settings] Use close time True
[1] Trading Settings [Settings] Start hour 10:00
[1] Trading Settings [Settings] End hour 17:00
[1] Trading Settings [Settings] Close hour 19:00
[3] Entry conditions [Entry] Allow buy signals True
[3] Entry conditions [Entry] Allow sell signals True
[3.1] Filter signals [Signal] 1st signal (buy/sell)  [Average 1] crossing upwards/downwards [Average 2]. Everytime a bar separates conditions, the first one refers to a buy, while the second one refers to a sell condition.
[4.1] [4.2] Moving Average 1-2 [Average 1-2] Use filter True 
[4.1] [4.2] Moving Average 1-2
[Average 1-2] Period Any numerical value equal or above 1.
I’ll set it to the defaults 9 and 21, respectively.
[4.1] [4.2] Moving Average 1-2 [Average 1-2] Shift Any numerical value equal or above 0.
I’ll set them both to 0.
[4.1] [4.2] Moving Average 1-2 [Average 1-2] Method Any predefined value.
I’ll set them both to Simple.
[4.1] [4.2] Moving Average 1-2 [Average 1-2] Price Any predefined value
I’ll set it to close price.
[4.1] [4.2] Moving Average 1-2 [Average 1-2] Timeframe Any predefined value.
I’ll leave them both to current. If this is current, it will use the timeframe defined by the Global Timeframe input parameter.
[5.3] Standard Deviation (StdDev) [StdDev] Use filter True 
[5.3] Standard Deviation (StdDev) [StdDev] Period Any numerical value equal or above 1.
I’ll set it to the default 20.
[5.3] Standard Deviation (StdDev) [StdDev] Shift Any numerical value equal or above 0.
I’ll set it to the default 0.
[5.3] Standard Deviation (StdDev) [StdDev] Method Any predefined value.
I’ll set it to the default Simple.
[5.3] Standard Deviation (StdDev) [StdDev] Price Any predefined value.
I’ll set it to close price.
[5.3] Standard Deviation (StdDev) [StdDev] Timeframe Any predefined value.
I’ll set it to current.
[7.2] Take profit [TP-Buy/Sell] Type on both buy/sell StdDev x3 
[7.2] Stop loss [SL-Buy/Sell] Type on both buy/sell StdDev x1 
[7.4.1] Volume [Volume] Default lot/risk (%) Any numerical value. Must be between the minimum lot size and the maximum. If the value is out of those bounds, it is automatically set to the minimum or the maximum lot size, the closest one. 
I’ll set it to 0.1.

The Strategy Tester settings were the following:

Because the all the selected timeframes were set to current, we can directly change it from the Strategy Tester settings. These were the results of this strategy:

Pretty bad, isn’t it? But we can make it better with a simple thinking: we can se from the money curve that the strategy makes a lot of trades. What can we do to reduce this number of trades? Let’s add another signal and optimize our strategy!

An idea of a signal is to check if the current bar is an Engulf Bar. A Bullish Engulf Bar, for this EA purpose, occurs when the current bar low is lower than the previous bar low, but it closes above the last bar high and its amplitude (range) is greater than 1.5x the amplitude of the previous bar. A Bearish Engulf Bar occurs when the current bar high is higher than the previous bar high, but it closes below the last bar low and its amplitude is greater than 1.5x the amplitude of the previous bar.

With this simple signal we can significantly reduce the amount of trades and increase the accuracy of our strategy. All we need to do this to add the Engulf Bar to the [Signal] 2nd signal (buy/sell) in the group [3.1] Filter signals.

For the optimization, we’ll select the Fast genetic based algorithm method in the Strategy Tester and will optimize the following inputs:

  • [Settings] Global timeframe – from 5 minutes to 20 minutes;
  • [Average 1] Period – from 5 to 14, in steps of 1;
  • [Average 1] Method – from Simple to Exponential;
  • [Average 2] Period – from 20 to 26, in steps of 1;
  • [Average 2] Method – from Simple to Exponential;
  • [StdDev] Period – from 8 to 20, in steps of 1;
  • [StdDev] Method – from Simple to Exponential;
  • [StdDev] Timeframe – from 15 minutes to 1 Hour;
  • [TP-Buy/Sell] Type on both buy/sell – from StdDev 1x to StdDev 3x.

The Strategy Tester goes like the following – note that since I’m changing the timeframes (global timeframe and the StdDev timeframe), the timeframe in the Strategy Tester must be M1 to avoid errors:

As a result, we got a bunch of profitable parameters from this strategy:

An example of money curve that we can get now:

The .set file can be found at the end of the page.

If you came all the way here, please feel free to get in touch with me if you have any questions and try out the newest Emerald EA Builder now!



Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

Calendar

October 2024
M T W T F S S
 123456
78910111213
14151617181920
21222324252627
28293031  

Categories

Recent Comments