New to the world of Metatrader and do not have a good understanding of the power of capabilities of MQL.
Is MQL capable of calculating a value using a semi complex mathematical formula or an equation that needs to calculate variables?
Thanks for your advice

- votes: 33
- 2012.10.12
- Сергей Бочканов
- www.mql5.com
New to the world of Metatrader and do not have a good understanding of the power of capabilities of MQL.
Is MQL capable of calculating a value using a semi complex mathematical formula or an equation that needs to calculate variables?
RaptorUk .Thanks for directing me to the maths functions. It appears I will be able to have what I want coded. As it is a maths formula would I be better to specify that a coder has a maths background?
What I want to be able to calculate is when a MA and WMA will be exactly the same price during the current bar ie the precursor to a cross. My maths is a little rusty but I believe the equation looks like this on MA40 and WMA5
MA = (CP1,39 + P)/40
WMA = ((CP4*1)+(CP3*2)+(CP2*3)+(CP1*4)+(P*5))/15
Find
MA =WMA
Value to be determined is P
CP are close prices
Is this within the scope of MQL's capabilities and how would this be best coded?
Thanks,
Noel

- www.mql5.com
What I want to be able to calculate is when a MA and WMA will be exactly the same price during the current bar ie the precursor to a cross. My maths is a little rusty but I believe the equation looks like this on MA40 and WMA5
Yes i am aware of the MAs propensity to cross and uncross, the EA deals with that. I was more interested to know is a maths equation the best way to determine the price that MA = WMA in the current bar or is there another method of calculating the same thing?
Additionally is it possible to form this equation in MQL where average periods can be modified by a parameter? For example go from MA40 to MA30
Yes i am aware of the MAs propensity to cross and uncross, the EA deals with that. I was more interested to know is a maths equation the best way to determine the price that MA = WMA in the current bar or is there another method of calculating the same thing?
Additionally is it possible to form this equation in MQL where average periods can be modified by a parameter? For example go from MA40 to MA30
Yes i am aware of the MAs propensity to cross and uncross, the EA deals with that. I was more interested to know is a maths equation the best way to determine the price that MA = WMA in the current bar or is there another method of calculating the same thing?
Additionally is it possible to form this equation in MQL where average periods can be modified by a parameter? For example go from MA40 to MA30

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New to the world of Metatrader and do not have a good understanding of the power of capabilities of MQL.
Is MQL capable of calculating a value using a semi complex mathematical formula or an equation that needs to calculate variables?
Thanks for your advice