Herbert20: Hello community. I am currently coding an ea which will allow me to know if the market base line of the TDI indicator (trading dynamic index) which is an exponential moving average is inclined downwards or upwards. In my research I saw that I could use the slope which, if positive, means that the MA is upwards, and if negative, that it is downwards. Here's the code: After testing, I've found that this isn't at all the case in practice. I have positive slopes but visually the Market Base line is tilted downwards. I need your help to explain to me how to go about determining the slopes so that the results given in the terminal reflect those seen on the graph. Thank you
Find your answer here: https://www.mql5.com/en/forum/219495
How to calculate slope of an EMA?
- 2017.11.11
- www.mql5.com
Hi, I've got this code calculating the moving average: double ma1 = iMA(NULL, MA1_TTIMEFRAME, MA1_PERIOD, 0, MA1_METHOD, MA1_PRICE, 0); How do I ca...
Herbert20:
Improperly formatted code edited by moderator.
In the future, please use the CODE button (Alt-S) when inserting code.
MQL5.community - User Memo
- www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
okay thanks
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello community. I am currently coding an ea which will allow me to know if the market base line of the TDI indicator (trading dynamic index) which is an exponential moving average is inclined downwards or upwards. In my research I saw that I could use the slope which, if positive, means that the MA is upwards, and if negative, that it is downwards. Here's the code:
After testing, I've found that this isn't at all the case in practice. I have positive slopes but visually the Market Base line is tilted downwards. I need your help to explain to me how to go about determining the slopes so that the results given in the terminal reflect those seen on the graph. Thank you