Hi guys.
Im kinda new to coding EAs in Mql5.
But i am trying to get the absolute values of variables, mainly my 'Loss'. I know that the MathAbs() function can solve the problem but i don't know how to execute it.
Here is where i am at:
double Loss = (1 + total pips for loss)
double MathAbs (
double Loss
) ;
I know that me putting the loss there is wrong, but i really don't know how to go about getting the numeric value for this.
Please help me out.
Thank you in Advanced 🙏
- How to get the total loss and total profit of trades in Mql5
- Number of Consecutive Sell Losses and Buy Losses
- Please Help
Clinton Okechwuku:
Hi guys.
Hi guys.
Im kinda new to coding EAs in Mql5.
But i am trying to get the absolute values of variables, mainly my 'Loss'. I know that the MathAbs() function can solve the problem but i don't know how to execute it.
Here is where i am at:
double Loss = (1 + total pips for loss)
double MathAbs (
double Loss
) ;
I know that me putting the loss there is wrong, but i really don't know how to go about getting the numeric value for this.
Please help me out.
Thank you in Advanced 🙏
double yourValue = -500.24; double yourAnswer = MathAbs(yourValue); Print("Answer " + DoubleToString(yourAnswer,2));
Clinton Okechwuku: I know that the MathAbs() function can solve the problem b
Perhaps you should read the manual.
How To Ask Questions The Smart Way. 2004
How To Interpret Answers.
RTFM and STFW: How To Tell You've Seriously Screwed Up.
Paul Anscombe:
Ok. Thanks alot. 🙏
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