SteveHopwood » Tue Jul 14, 2020 3:41 pm wrote: .............
This version derives from strcat32's question at viewtopic.php?p=170737#p170737. I watched the video. The presenter might be a shyster using software to manipulate the charts or he might be genuine. The only way to find out is to test. Here is the methodology:..............
- Go long when:
- MACD Main line crosses the Signal line from below.
- MACD Main line is < 0.
- The market is above a 200 period EMA.
- Go short when:
- MACD Main line crosses the Signal line from above.
- MACD Main line is > 0.
- The market is below a 200 period EMA.
I discovered that the MACD history line is not taken into consideration here. In the video (in the description is the full read text) it is mentioned:
MQL4 does not have a default function to get the MACD histogram but I could find a code example within an indy:https://www.myfxbook.com/de/community/p ... /1607173,1MACD crossover strategy is simple once the MACD line crosses above the signal line it is considered as a buy signal. Furthermore you should only take buy signals that are way below the zero line of the histogram.
but there is a big problem with this trading setup! there is no way to identify a good direction of a trend using MACD indicator alone. To be a profitable trader as a beginner you should always trade in the same direction as the market is trending. So to identify the trend we are going to use 200 period Exponential Moving Average! If the market is above 200 E M A it is considered as an up trend.
It simply is:
HistogramBuffer = MACDLineBuffer - SignalLineBuffer;
Adding this additional confirmation would rule out possible looser trades. What do you say?
Also I think a new setting HistogramFactor is needed to ensure the "way below" the zero line of the histogram.
This post might meanwhile belong also to Trendy Monster Moving Day.
If time allows me I will work on a code change suggestion during next days.