|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
MACD Code - Question for programmers.
Hello.
I need the MACD indicator Well, not really. By accident I plotted two different MACD indicators on the same chart and what I saw was a little confusing. So, I added a third one. As you can see in the picture. From above to below. MACD 1 is the normal code of Metaquotes MACD standar which comes with the software. With the addition of the histogram. MACD 2 is a popular version called imacd or realmacd MACD 3 is Metaquotes "pure" MACD. If you take a little attention to the picture, the slope of signal line in MACD 2 (middle) is different. After saw that the first thing comes to my mind was: wrong code. But, I decided to compare with another charting software to discard any doubt and ouch. VTS have the slope like the middle MACD, also Accucharts, also TS2ki and other one. Also, to confirm the question I move to a big TF and avoid possible differences in the close of the candles. Still in doubt Iīd take little research. I donīt have the phone of Mr Appel, so I have to search in google. In this link Iīve found nice material to start. http://tadoc.org/indicator/MACD.htm Then I was to Investopedia and found some articles, hereīs a cut: Quote:
Quote:
Quote:
Also, take a look at the code of IMACD. PHP Code:
__________________
Last edited by Linuxser : 03-14-2007 at 02:26 AM. |
|
||||
|
Ok, now, letīsee the a couple of things.
One big difference in the code of iMACD (Iīm trying to contact them) is the way to calculate the signal line. First, he add two vars PHP Code:
Why? hereīs the answer PHP Code:
Mmm, wait a minute. Appel and all explanations says EMA, but I saw an SMA somewhere. Where? In the original Metaquotes MACD, check by yourself. Quote:
So, if we change just one letter we can obtain a line like this Quote:
And the slope of the signal line start to be close with the aforementioned software. Take a look at the next picture Programmers, what you think? Who is right? Who is wrong? Iīm right? Iīm wrong? Itīs bug in the Metaquotes MACD code? macdg.gif
__________________
|
|
|||
|
Looks like a bug in MetaQuotes MACD. Why don't you go to MQL4.com and submit this bug on their forum? Having said thata - it doesn't mean they will fix it. I have submitted at least 5 bugs with them and they refused to fix any of them...
|
|
||||
|
Quote:
What other bugs did you find? My solution is my own macd, see picture First MACD in the picture is the original, other is mine. macdlnx.gif.
__________________
Last edited by Linuxser : 03-14-2007 at 11:46 PM. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code? | samahdi | Metatrader Programming | 1068 | Yesterday 10:07 PM |
| Question for programmers | onelesstick | General Discussion | 2 | 10-27-2006 08:09 PM |