Multiple Indicator Exper Advisor

Custom MT4 expert advisors published here.

Moderator: admin

Multiple Indicator Exper Advisor

Postby Apprentice » Wed Mar 01, 2017 5:28 am

Multi_Indicator_EA.png

DESCRIPTION:

This Expert Advisor is a complete trading system based on a variety of technical indicators, moving averages and pivots. Each of those elements can be assessed in many ways (depending on the indicator) providing limitless optimization scenarios for the expert advisor. In order to work it is needed to play with the variables and create defined rules and coefficients. Default parameters will not provide the expected positive results.

Indicators included with the possible scenarios for Entry:

- RSI (Above Middle Line, Below Middle Line, Positive Slope, Negative Slope, Above OverBought Level, Below OverSold Level)
- Stochastic (Above Middle Line, Below Middle Line, Positive Slope, Negative Slope, Above OverBought Level, Below OverSold Level)
- CCI (Above Middle Line, Below Middle Line, Positive Slope, Negative Slope, Above OverBought Level, Below OverSold Level)
- Ultimate_Oscillator (Above Middle Line, Below Middle Line, Positive Slope, Negative Slope, Above OverBought Level, Below OverSold Level)
- MACD (Above Middle Line, Below Middle Line, Positive Slope, Negative Slope)
- Williams_Percent (Above OverBought Level, Below OverSold Level)
- ADX (Weak Trend, Strong Trend, Very Strong Trend, Extremely Strong Trend)
- ATR_High_Volatility (If True is considered)
- Use_ROC (If True is considered)
- Use_Bear_Bull_Power (If True is considered)

Current Price Above these indicators for Buy, Below for Sell:

Pivot Point
SMA(5)
SMA(10)
SMA(20)
SMA(50)
SMA(100)
SMA(200)

Coefficients for Entry:

At this moment there are 17 different indicators considered.

- The trader selects the Entry Percentage given by the coefficients for Entry (70% by default)

- Each Indicator can be used or not

- If the indicator is used, its coefficient is added to the Total_Coefficient. By default each indicator has coefficient equal to 1. If the trader considers that some indicators should weigh more than others he needs to play with the coefficient values, the total would be also increase in this case and whenever the indicator with the higher coefficient gives true for either buy or sell it will make the entry more viable.

- For example, if all indicators are equal to 1 and 11 of them give a buy signal, the Buy Entry Commitment at that moment is (11/17)=64.7%. But if the MACD, SMA(10) and SMA(20) have a coefficient of 2 and the 3 of them were giving a buy signal in those 11 indicators, the Commitment would now be (14/20)=70%. This means that the necessary total is higher now but if the indicators making that total higher are giving a signal then the commitment percentage would be reached faster.

Expert Advisor Options/Features:

- Only one trade at once
- Automatic Lots based on Risk: 1% by default
- Trader can choose to trade both directions or only buy or sell
- Trader can select the Time Frame to be analyzed
- Trader can have predifined Stop Loss, Take Profit and Trailing Stop Loss (TSL needs revision)
- Stop Loss and Take Profit Levels modified automatically as per trader values in points (5-digit brokers 1 pip = 10 points, so 20 pips are 200 in these fields)
- Optional Sound and Email Alerts included
- Other features: slippage, magic number, manual lots

Multi_Indicator_EA.mq4
(76.91 KiB) Downloaded 1049 times
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 22078
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Multiple Indicator Exper Advisor

Postby wordlink » Wed Mar 01, 2017 7:42 am

Well now say... I really do love this. I downloaded it and already have it running. It has made its first trade and we're profitable (so far!).

I'm new to MT4 but not to programming. I'm willing to be a beta guinea pig.

If there are problems I'll try looking at the code first before I complain.

P.S. I know you from LUAs you have written and I have used from FXCM days.
wordlink
 
Posts: 3
Joined: Wed Mar 01, 2017 7:30 am

Re: Multiple Indicator Exper Advisor

Postby Apprentice » Fri Mar 03, 2017 3:22 am

Revisions contemplate the following:

- Trailing Stop working properly as well as TP/SL levels
- Trader can determine maximum number of trades opened at once
- EA now records the historical total profits and displays them in the comments, additionaly the P/L for each trade can also be displayed (this is optional and is the last parameter in the EA)
- Initial SL and TP are only modified once
- The trailing stop will work only after a trailing step has been met, for example each 5 pips will make the 10 pips trailing stop to be modified (Difference between Bid or Ask and the TSL)
- If the trader chooses to have more than 1 trade open at once he can determine the minutes to wait for the next trade to be opened.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 22078
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia



Re: Multiple Indicator Exper Advisor

Postby wordlink » Fri Mar 17, 2017 1:37 pm

OK, here is an update.

This version corrects the "only Long, only Short" feature that was not working.

It corrects the trailing stop feature. If you specify a Trailing Stop, you should not specify a regular stop. But if you do both, the Trailing stop will override it. So if you set your stop to 30 pips but set your trailing stop to 50 pips, then the original stop will be set to 50 pips. It will move the stop every 5 pips.

I've added a setting called "Allowed Trade" which is initially set to true. If you set this to false, then the EA will run and will update the polling data on whether it *should* go long or short, but will not actually trade it. You can just watch it for awhile.

I've also made what could be a controversial change. The original version waited for the trade to be stopped out before changing direction. I've added code that will allow a stop and reverse if the polling changes its mind in the middle of a trade.
Attachments
Multi_Indicator_EA.ex4
(80.2 KiB) Downloaded 709 times
wordlink
 
Posts: 3
Joined: Wed Mar 01, 2017 7:30 am

Re: Multiple Indicator Exper Advisor

Postby Mandelbrot » Sun Mar 19, 2017 1:30 pm

Interesting corrections.

Could you please attach the mq4 file for a proper comparisson and ad these features to the EA framework?

Thanks
Mandelbrot
 
Posts: 5
Joined: Fri Mar 11, 2016 11:33 am

Re: Multiple Indicator Exper Advisor

Postby Apprentice » Tue Mar 21, 2017 4:24 am

This is a major update to the following Expert Advisors:

- Multi Indicator EA
- Two MA Cross EA
- MA Cross with Exit EA

The following improvements have been made:

- Now the trader sets the number of pips rather than points (no more thinking about how many points to set, simply write 20 for 20 pips and that's it).
- EA can be activated/deactivated to trade or not
- Auto Lots calculation has been revised and is working properly
- Comments displayed on chart give more information about risk, lots, equity, opened orders
- (By the way, trades comments can be turned off to avoid the comments area to keep growing)

Additions:

The trader can now estipulate a maximum percentage of risk for open trades. For example the risk can be 2% per trade and the maximum 7% of the equity. The user can also choose the number of opened trades at the same time, for example 5.

So the way it works is that once the SL has moved to breakeven, then the risk for that trade is no longer considered in the equity providing additional room for opening further trades if necessary. It could be, for instance, that there were 3 opened trades but the 4th one was opened when one of the prior 3 moved to B/E.

Also, the trader could decide to have the same fixed lots every time and again set a maximum number of lots traded. For example 1 lot per trade and a maximum of 4 lots in total.

One note about the trailing stop

The way the Stop Loss works is to initially protect the trade, say with 20 pips. If the user additionally sets a trailing stop (TSL) of 15 pips with a 5 pips step, it will not work until the trade is in profit. This means they are two different concepts. The TSL will be activated when the trade is 15 pips in the green and then correct itself every 5 pips (step).
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 22078
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Multiple Indicator Exper Advisor

Postby wordlink » Thu Mar 30, 2017 11:11 am

I really like the changes. This is some of your best work! It's like a Swiss Army knife for trading.
wordlink
 
Posts: 3
Joined: Wed Mar 01, 2017 7:30 am

Re: Multiple Indicator Exper Advisor

Postby Benido93 » Wed Mar 06, 2019 8:24 pm

Hi!
I'm new here.
I need multiple indicator exper advisor last version for MT4; (possibly in french)
Thanks
Benido93
 
Posts: 1
Joined: Wed Mar 06, 2019 8:19 pm

Next

Return to MT4 Expert Advisors

Who is online

Users browsing this forum: No registered users and 9 guests