How To Build Your Own EAs From Scratch In Seconds

How To Build Your Own EAs From Scratch In Seconds

1 September 2017, 17:54
Besarion Turmanauli
0
797

In this article I'll show you how to create a simple RSI strategy with Universalis MT4 strategy builder

EA is very powerful and simple to master at the same time, so this article will give you the basics of how to work with it and you can create much more complex strategies based on any standard or custom-built indicator. 

  1. CREATING A SIMPLE RSI STRATEGY:

    • GETTING ALL DATA READY
      • For the sake of simplicity let's just create a simple RSI (relative strength index) automated strategy..
      • Please, make sure that all imported indicators (RSI in this case) are actual files inside Indicators folder because some of the indicators are directly integrated into MT4 Terminal code and aren't available for import.  
    1. Let's locate Indicators > RSI in navigator window and drag it on the chart.
    2. Just before clicking OK to finish, select inputs tab:   there's only one input with a default value of 14. 
    3. Click OK.
    4. Now click on this  button in MT4 top menu in order to activate data window (if it's not already active).


    5. Active data window will display something like this: here we see some values for current candle as well as RSI ( with an input value: 14 ) current value which is 45.7014. One indicator may export multiple values in data window, but this one - RSI only has one, we will call them buffers hereinafter. Typically, if indicator has one buffer, it's numeric index will be 0, next one will be 1, 2, 3 etc...  




    • YOUR RULES:
      • BUY if RSI is less that 20 and current RSI value > previous RSI value.
      • SELL if RSI is greater than 80 and current RSI value < previous RSI value.
      • SL is above/below signal candle's high or low (depending on direction) and is further increased by 50 points to avoid premature exit. 
      • TP is twice as much as SL. 
    • INPUTS: 
      1. Stop Loss: 

      2. Take Profit:

      3. Indicator Import:  if indicator file is inside indicators folder, just type indicator name in relevant field (in this case: First Indicator Name) to activate it. Then add all input values one after another. We just have one input value: 14, so let's fill it in First Input Value field and leave the other inputs set to -1 in order to disable them.

      4. Now let's set up all our rules. Remember Indicator buffers are indexed as 0, 1, 2 etc. And as we have only one buffer, therefore we should refer to it as buffer 0, let's go:  

        As you see we are referring to Buffer 0 twice, first time to setup 1 Buy/Sell rule and second time to setup second Buy/Sell rule. 

                            Start Building Your EAs Now: Universalis MT4 strategy builder


P.S. In order to import standard MT4 indicators, please do so from Standard folder inside Indicators

Indicator name field will have to be set to:

  • Standard\Accelerator
  • Standard\Accumulation
  • ...
  • Standard\Custom Moving Averages
  • Standard\Heiken Ashi
  • ...
  • Standard\Stochastic 

etc.. to name a few examples. 

Best regards!

Besso

Share it with friends: