The two most popular ways of trading with MACD are: 1) buy (sell) when the MACD line crosses over (under) the Zero line (strategy=1 in my EA) 2) buy (sell) when the MACD line crosses over (under) the Signal line (strategy=2 in my EA) Interestingly enough, when I tested both strategies, only strategy=1, the MACD line (histogram) crossing the Zero line, proved profitable on some currencies. The second one, MACD line crossing the Signal line, was a big disappointment. Since the MACD seeks to overcome the MA's problem of lag, by being more responsive to market movements, it encounters the problem of noise, of generating too many false signals on suspect trends. In order to dampen this noise issue I outfitted the EA with a moving average filter. My default length was 200 on H1, and it turned out to be pretty good. It seemed to take away much of the whipsaw trades. The only other thing I did was change the length of the slow moving average, within the MACD, from 26 to 30. If you are going to optimize any length, this is the one.