On this weblog I am going to clarify how the “MACD ALL” EA works so you’ll be able to make the most of its options.
BASIC FUNCTIONALITY:
The EA works utilizing a “sign”; this “sign” is the cross of the MACD and the sign line of the MACD indicator (you’ll be able to select the MACD indicator settings). When the macd crosses under the sign line, then it’s a “promote sign”; when the macd crosses above the sign line, it’s a “purchase sign” (that is calculated when the bar closes).
It is the identical indicator because the default MACD on MT5; simply the macd is represented as a blue line as a substitute of a histogram.
YOU CAN APPLY FILTERS TO THE “SIGNAL”:
(inputs)
Use ema as pattern filter(default = true): This can be a easy pattern filter; it solely confirms the sign if the worth is above the EMA for a “purchase sign” and under the EMA for a “promote sign.” (makes use of a 200-period EMA by default, however you’ll be able to change it)
With out ema Filter
With ema Filter
Use atr as filter(default = true): The filter checks if the candle on which the sign is generated is simply too huge so the specified worth transfer already occurred; to examine this, the EA makes use of the ATR to match. (makes use of a 20-period ATR by default, however you’ll be able to change it)
With out ATR Filter
With ATR Filter
Solely crossover under 0 line and Solely crossunder above 0 line(default = true): This filter checks if the cross of the MACD and the sign line happens above the 0 line for a “promote sign” and under the 0 line for a “purchase sign”.
With out 0 line Filter
With 0 line Filter
Hours filter(default = false): Checks if the sign is generated within the specify hours.
MAKING TRADES:
You should utilize the EA as an indicator with out autotrade; there are two inputs:
“Activate alert on sign” (default = false): Because the title says, this enables the EA to ship an alert each time a “sign” is detected; you need to use this if you wish to manually commerce utilizing your individual evaluation.
“Activate arrow printing on sign” (default = false): This enter permits the EA to print arrows each time a “sign” is detected; you’ll be able to see this engaged on the screenshots above exhibiting the printed arrows.
You possibly can activate autotrading utilizing the enter “Activate buying and selling on sign” (default = true). When it is activated, the EA will enter trades on “purchase sign” or “promote sign.” The EA has totally different choices on threat, stop-loss placement, take-profit placement, and trailing stop-loss.
RISK SETTINGS:
(inputs)
Danger sort (default = Fairness proportion): The EA can use 3 totally different threat sorts.
Fairness proportion: Utilizing such a threat, the EA will calculate the right lot dimension to threat the chosen proportion of the account fairness in the meanwhile the commerce is opened; for instance, if you happen to select a 1% threat, and in the meanwhile the EA makes a commerce, the account has an fairness of $10,000, the chance on the commerce can be $100. (You possibly can select the share in danger on the enter “Danger proportion” [default = 0.5%]).
Mounted lot dimension: Because the title signifies, utilizing such a threat, the EA will make trades utilizing the chosen lot dimension on each commerce. (You possibly can select the specified lot dimension on the enter “Lot Measurement” [default = 1.0]).
Mounted quantity in cash: Utilizing this kind, the EA will threat the identical amount of cash on each commerce. (You possibly can select the specified cash in danger on the enter “Danger Quantity” [default = 100]).
STOPLOSS SETTINGS:
(inputs)
Cease Loss sort (default = Pivot): The EA can use 4 totally different cease loss sorts.
Pivot: This stoploss makes use of the bottom or highest, pivot of the final bars. to calculate the pivot the EA makes use of the inputs “pivot size” and “lookback for pivot”. pivot size refears to what number of candles must be under in case of a excessive pivot or above in case of a low pivot on the proper and the left of the pivot candle. and the lookback is what number of candles earlier than the entry the EA will attempt to discover a pivot for instance if the lookback is 5 then the EA will analize the final 5 candles on the lookout for a pivot.
How pivot works:
Mounted factors: Utilizing this, the cease loss can be of the specified dimension in factors utilizing the formulation STOPLOSS = ENTRY – POINTS * POINTSIZE (in case of purchase, if promote the – is +). For instance, if you happen to use 100 factors on a purchase commerce on the US500 with entry = 3850.4 and on this case the purpose dimension for the US500 is 0.01, the cease loss can be 3850.4 – 100 * 0.01 = 3849.4. (You possibly can select the specified factors on the enter “SL factors” [default = 100]).
Share of worth: Place the cease loss utilizing the share of worth utilizing the formulation STOPLOSS = ENTRY – (PERCENTAGE/100 * ENTRY) (in case of purchase, if promote the – is +) ; for instance, if you happen to use a 1% cease loss on a purchase commerce on the US100 with entry = 15000, the cease loss can be 15000 with a 1% lower, so 15000 – (1/100 * 15000) = 14850. (You possibly can select the specified proportion on the enter “SL proportion” [default = 1.0]).
ATR: It makes use of the atr worth and multiplies it by a selected issue, the result’s subtracted of the open worth if purchase commerce or added in case of a promote commerce utilizing the formulation STOPLOSS = ENTRY – ATR * FACTOR (in case of purchase, if promote the – is +), for instance utilizing a issue of 1.5 on a purchase commerce on US500 with entry = 3800 and ATR = 27 the cease loss can be 3800 – 27 * 1.5 = 3759.5. (You possibly can select the specified issue on the enter “ATR issue for SL” [default = 1.2]).
Similar commerce totally different SL:
TAKE PROFIT SETTINGS:
(inputs)
TP sort (default = By ratio): The EA can use 3 totally different take revenue sorts.
By ratio: It takes the SL distance and multiplies it by a desired ratio, which is the standard risk-reward ratio (RR). You need to select the ratio utilizing the enter “TP ratio” (default = 1); a “TP ratio” of 1 means a 1 to 1 RR (if you happen to threat 100, you win 100), and a couple of means a 1 to 2 RR (if you happen to threat 100, you win 200). So the formulation to calculate the TP placement for a purchase: TAKEPROFIT = ENTRY + (ENTRY – SL) * RATIO for a promote: TAKEPROFIT = ENTRY – (SL – ENTRY) * RATIO. For instance, on a purchase commerce on US100 with entry = 15000, cease loss = 14500, and a “tp ratio” of two.5, the take revenue can be 15000 + (15000 – 14500) * 2.5 = 16250.
By factors: Is similar because the “Mounted factors” Stoploss, however for the take revenue, so it place a take revenue of the specified dimension in factors utilizing the formulation TAKEPROFIT= ENTRY + POINTS * POINTSIZE (in case of purchase, if promote the + is -). For instance if you happen to use a 100 factors take revenue on a purchase commerce on US500 with entry = 4256.3 and on this case the purpose dimension for the US500 is 0.01, the take revenue can be 4256.3 + 100 * 0.01 = 4257.3. (You possibly can select the specified factors on the enter “TP factors” [default = 100]).
No TP: Because the title signifies, it means the commerce opens with out take revenue; this selection exists in case you wish to use the trailing stop-loss function and go away the commerce open till it hits the trailing stop-loss.
TRAILING STOPLOSS FEATURE:
The EA has the choice of utilizing a trailing cease loss; this trailing cease loss makes use of the identical logic as the conventional cease loss, so the trailing cease loss sorts are the identical as the conventional cease loss sort however use separate inputs, and the trailing cease is calculated on each tick and begins working as soon as the trailing cease is in revenue.
PROMISING RESULTS:
Once I was creating the EA and enjoying with the settings I encountered some worthwhile setups that look promising, on the US100 image and the US500 image, each utilizing the 4H timeframe.
US100 4H timeframe 1% fairness threat 2016-2024 80% development 15% max DD (utilizing actual tick knowledge)
That is with a 1% fairness threat per commerce; with a 2.5% threat per commerce, it reaches a 378% development with a 35% max DD, matching the identical max DD you’d have gotten if you happen to purchased and held the US100 in the identical time period however nearly doubling the expansion.
US500 4H timeframe 2.5% fairness threat 2022-2024 64% development 7.9% max DD (utilizing actual tick knowledge)
The identical case as earlier than, you’ll be able to change the chance to acquire totally different outcomes.
These are the set information with the settings used on US100 and US500.
Needless to say these outcomes had been obtained with out optimization, so you’ll be able to most likely discover a higher setup by altering some issues and optimizing the settings.