Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:
Please use this to post code . . . it makes it easier to read.asking your question you know this
Timeframe of the chart (chart period). It can be any of the following values:
We also know MathPow( 2, 0) =1, MathPow( 2, 1) =2 MathPow( 2, 2) =4 So values like 1,2,4,8,16,32,..... Maybe you found an error ..... Trie out what it does in iMACD So make a program and print out the values iMACD with mathpow(2,i) as timeframe, and look to the outcome Do it also with the normally timeframeperiods and compare them |
asking your question you know this
Timeframe of the chart (chart period). It can be any of the following values:
We also know MathPow( 2, 0) =1, MathPow( 2, 1) =2 MathPow( 2, 2) =4 So values like 1,2,4,8,16,32,..... Maybe you found an error ..... Trie out what it does in iMACD So make a program and print out the values iMACD with mathpow(2,i) as timeframe, and look to the outcome Do it also with the normally timeframeperiods and compare them |
I got 0 using the Mathpow(2,i) when i!=0, which means iMACD does not work.
I got 0 using the Mathpow(2,i) when i!=0, which means iMACD does not work.
I really think the author of the code did that on purpose.
Hi lostbridge,
You're really lost this time ;D.
It's called code obfuscation. The purpose for code obfuscation is to confuse, even to mislead it's reader so that the code is hard to understand. That MACD will only return value when MathPow(2,0) value is 1 which is period M1.
Click here - https://en.wikipedia.org/wiki/Obfuscated_code
:D
Hi lostbridge,
You're really lost this time ;D.
It's called code obfuscation. The purpose for code obfuscation is to confuse, even to mislead it's reader so that the code is hard to understand. That MACD will only return value when MathPow(2,0) value is 1 which is period M1.
Click here - https://en.wikipedia.org/wiki/Obfuscated_code
:D
That is the point. Thanks
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I am reading the code from the highest rated EA https://www.mql5.com/en/code/8553.
I need help for the above lines that is in the block of AskMACD()
My question is here:
How can MathPow(2,i) be used to choose a timeframe? I am having a hard time to understand it. Need your help. Thanks