| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| How to detect MACD cross? https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1451 |
Page 1 of 1 |
| Author: | remix919 [ Sun Feb 03, 2013 10:29 pm ] |
| Post subject: | How to detect MACD cross? |
I setup 2 variables to detect the value of the MACD in the current period and last period Code: Select all Code: Select all |
|
| Author: | SteveHopwood [ Sun Feb 03, 2013 11:45 pm ] |
| Post subject: | Re: How to detect MACD cross? |
The first thing you have to do is start using sensible variable names that mean something, so if this is actually your code then stop being so bloody silly. Only an idiot uses variable names like these. I went cross-eyed merely trying to read the code snippet you posted. Your snippet looked like decompiled code. Is it? If so, forget trying to translate it. I did so once and will never do so again; decompiled code is gibberish. You will have taken a leap forward in your understanding of coding once you work out for yourself why decompiled code is impossible to work with. |
|
| Author: | remix919 [ Sun Feb 03, 2013 11:54 pm ] |
| Post subject: | Re: How to detect MACD cross? |
It's not decompiled code, I had downloaded a simple EA that just had basic buy and sell functions and they had their indicators listed with li_x and I had just replaced the indi with my own but kept the variable name. |
|
| Author: | SteveHopwood [ Mon Feb 04, 2013 12:25 am ] |
| Post subject: | Re: How to detect MACD cross? |
That is decompiled code, fella. It may have escaped your notice, but I know a thingy or umpteen about this stuff. It is up to you whether you follow my advice or not. Fact is,what you have posted is unintelligible gibberish that will be ignored unless you happen to come across a very patient reader. They are rare. |
|
| Author: | remix919 [ Mon Feb 04, 2013 2:16 am ] |
| Post subject: | Re: How to detect MACD cross? |
O, ok, well, what I was trying to do was have an EA that had 2 MACD indicators, one based on the current period, and the 2nd being 1 period back. I wanted it to trigger a buy/sell based on when the MACD crosses 0, so I figured if the first MACD > 0 and 2nd MACD < 0 at the same time, it would mean there had been a cross. |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|