Hybrid Scalper Expert Advisor For MT4
WE IMPROVED THIS EXPERT ADVISOR FOR YOU!!!
PLEASE NOTE: This expert advisor was publicly available for free usage on other websites and is not programmed by us. We explain the functionality and possible improvements of the EA. Furthermore, we are convinced that fully automatic Expert Advisors will fail in the long run. On the other hand, our semi-automatic approach with detecting the best setups and then activating our Expert Advisors (e.g. V-Power EA, EdgeZone EA) produced many successful traders and some of them even got prop traders at prop trading firms. Therefore, we added a similar semi-automatic trading feature (to allow only buy or only sell trades) to the free Expert Advisors. You can download the modified version here and enjoy!
Table Of Contents:
- Hybrid Scalper Expert Advisor For MT4
- The Hybrid Scalper Expert Advisor for MT4 – Entry Criteria
- The Hybrid Scalper Expert Advisor for MT4 – Exit Criteria
- The Hybrid Scalper Expert Advisor for MT4 – Room for Improvement
The Hybrid Scalper Expert Advisor For MT4 uses a battery of technical indicators to trade the financial markets. These indicators are available in the MT4 platform. Since all indicators must come in agreement before a trade signal is determined and confirmed, the expert advisor opens few trades over a period of time.
One area that is unique to this trading system is the trade management method being used. The stop loss and take profit of each trade may move up and down as price oscillates until either the stop loss or take profit is hit, resulting in a win or loss. Regardless of where price moves, the distance between the stop loss and take profit is constant.
The Hybrid Scalper Expert Advisor for MT4 – Entry Criteria
The Hybrid Scalper Expert Advisor for MT4 displays information on the chart that is helpful in trading. This includes the account name, company, leverage, lot size, long and short swaps, spread, name of expert advisor, account type, magic numbers and day of the week. See image above.
The trading system gives the user plenty of parameters to work on in Inputs to be able to influence or control the operation of the expert advisor. The most important parameters are explained below:
- Rsilevel = 7 – This is the period used for the RSI.
- max_spread = 20 – This value is in points. A trade would not be entered if the current spread is greater than this value.
- autocalculatelots = true – By default, this variable is set to true. As such, the lot size varies per trade and is determined based on the account balance.
- lot_size = 0.01 – If automatic lot sizing is not used, trades will have this lot size.
- allowreverse = true – Since this value is true, stop and reverse strategy will be used.
- magicnumber = 11 – The first strategy will use this magic number.
- magicnumber2 = 12 – The stop and reverse strategy will use this magic number.
- MondayTrade = true – Trading is allowed on Mondays.
- TuesdayTrade = true – Trading is allowed on Tuesdays.
- WednesdayTrade = true – Trading is allowed on Wednesdays.
- ThursdayTrade = true – Trading is allowed on Thursdays.
- FridayTrade = true – Trading is allowed on Fridays.
- stopduringMarketvolatilityDays = true – Since this is true, trading will not be allowed on certain days of the year.
- bbperiod = 50 – The Bollinger Bands indicator has a period of 50.
- bbdeviation = 4 – The Bollinger Bands indicator has a deviation of 4.
A range of technical indicators that comes in MetaTrader4 platform is being used in this trading system to define the trade entry. How the indicators provide the type of signal and time of entry is discussed below:
- Bollinger Bands (period 50, deviation 4) – This indicator is used to measure market volatility. A trade entry is only considered when volatility is within normal range as defined in the code. If the distance between the upper band and the middle band is less than 4.5 pips or greater than 26.2 pips, this means that volatility is not normal. In the same way, if the distance between the middle band and the lower band is less than 4.5 pips or greater than 26.2 pips, this means volatility is not normal.
- Stochastic (5, 3, 3) – This indicator is used to provide overbought and oversold readings. If the main line of the stochastic for the current candle is below 20 and the signal line is below the main line, a bullish signal is generated. If the main line for the current bar is above 80 and the signal line is above the main line, a bearish signal is given.
- Exponential moving averages (periods 21 and 89, price close) – A crossover of two moving averages in the 15-minute chart is used to define the trend bias. If the 21 moving average is above the 89-moving average for the current candle, the trend bias is bullish. If the 21 EMA is below the 89 EMA for the current candle, the trend bias is bearish.
- Relative strength index (period 7, price close) – This indicator is the final filter for entry, and it is used in the same way as the stochastic. If the RSI value for the current bar, symbol and timeframe is less than 25, the signal is long. If the RSI value is greater than 85, the signal is short.
Several conditions must be satisfied before the expert advisor opens a trade. First, the robot will not take a trade if the current spread of the current symbol is greater than the max spread defined in Inputs. Therefore, the user must be careful in setting the max spread parameter in Inputs. The spread of the traded symbol, which varies all the time, should be carefully analyzed before the user sets the max spread value.
In addition, the robot will trade only the one-minute chart. As suggested in Inputs, this program should be run in EURUSD currency pair. If the user, however, prefers another symbol, the timeframe of that symbol should be set to the one minute. If not, the robot would not consider a trade entry.
The day of the week is another consideration for entry. While the robot can trade from Monday to Friday, the user must set the five variables in Inputs to true starting from MondayTrade to FridayTrade. However, the user is free to choose the day or days in which to run the expert advisor.
There are certain days in a year that the robot would not run. As hard coded by the program creator, the robot would not trade from 14 to 31 of December and from 1 to 4 of January. This is possibly because of the low volatility of the markets in general during these times of the year. In other days, the robot would determine the market volatility based on the Bollinger Bands indicator and then either trade or not trade based on the result of the computation.
The Hybrid Scalper Expert Advisor for MT4 – Exit Criteria
The Hybrid Scalper Expert Advisor for MT4 opens one trade at a time. Upon entry, the robot sets the stop loss and take profit to 10 pips each. As market moves, the stop loss and take profit levels also move up and down, maintaining a distance of 20 pips between the stop loss and take profit. The trade is closed when the trend (up or down) asserts itself and price hits either the stop loss or take profit limit.
The Hybrid Scalper Expert Advisor for MT4 – Room for Improvement
The Hybrid Scalper Expert Advisor for MT4 was not able to generate profits in testing using the default settings. Further testing might be necessary, preferably using optimization, to determine the best settings that will yield positive results. However, the robot can only be tested and used in the one-minute chart.
The code needs review to determine the accuracy of conditions for entry and updating to make reading easier. Reading the code can be challenging because the coding style is old-fashioned. For example, the block of code for the for-loop function when determining the order type of the currently selected order is all over place and a lot of line spaces is used in between.
Coding was unnecessarily lengthened due to the use of a multitude of if statements. For example, checking if the maximum spread entered by the trader is reasonable, a function used 56 lines of code, but it can be done in about five lines of code. The spread concern is crucial as it is one of the factors considered when looking for a trade entry. If the spread of the underlying symbol is greater than the max spread set by the user in Inputs, the robot would not take trades at all, so the user must get it right from the get-go.