MACD is broken
-
Whenever i try and make use of macd it just does not seem to work the way it should.
It should be as simple as 1,2,3 like it is with all other indicators but its not.
Why is that?
And i read so many posts and people keep having issues with MACD
-
@luqmaan MACD works just fine for me. You have probably misunderstood some of the labels in MACD, as they arent very clearly explained (main line, signal line, "moving average of oscillator")
-
@roar ok do you mind to show me how to set up correctly? Please set up something simple and have me take a look at it?
I wana use macd in 2 ways
- when (MAIN) line crosses the (zero/centre)
- when main line and signal line cross.
The main thing I want to get right is the main crosses the zero.
-
@luqmaan I fear there is also some timing problems. You see, the EA runs the algorithm on every new tick, and forgets everything that happened last tick.
Do you need to apply AND-logic to zero cross and signal cross? So that they must happen at the same instant (tick)?
Also, do you want to act immediately when a cross is detected (intra-candle), or wait until the candle has finished and the cross gets confirmed in the chart history? To do this, you must use candle ID 1 in the block parameters. -
@roar thanks for the reply, to your first question.
I want to try with main tick and signal tick and see which gives me the best results.
I mostly want it to read off the main of the last bar of the macd (not off the signal of the candle) as i have stated before. Basically if it shows 1 bar up on macd. I want it to buy. Obviously i intend to try with diffirent indicator combinations but I need to get this part right first. I have tested with candle 1 as you have mentioned but to no avail.When i run the tests it buy close in a loop the enture time!

-
@roar to put it simply. Whenever the main line is in the upper portion of the macd (zero line) i want it to buy. And when its in thr lower portion of the macd (zero line) i want it to sell.
-
@roar i ran another test, still the same issue. Is it possible to draw up a logic tree similare to the one i posted, test it out on your end to see if it buys/sells and send it to me?
-
@luqmaan as I said, the EA runs the whole algorithm on every tick. Your algorithm has "close trades" immediately after "buy now". This means your trades are opened and closed at the same tick.
To fix this, use the ELSE-output of "No trade":

-
@roar I aw the mistake. I swapped close trades around with buy/sell, a silly over sight. Now it doesnt close trades after opening but it only executes the buy and doesnt close the trade
-
@roar do you mind making a simply buy/sell when macd is above or bellow zero line. The one i have works however it works with macd main + signal. Even when i make it
macd main x> 0
or
macd main > 0
Or
Macd main ×> 0.000000
Or
Macd main > 0.000000It still does not work the way it is supposed to.

The red is where it is supposed to execute a trade on the backtest.
But...
The yellow it is actually executing trades on back tests.
-
@luqmaan here an example
https://fxdreema.com/shared/JTghFw49d -
@roar thank u so mich, this is perfect. Exactly what i needed to know