Nedal Burdukani:
Hello
What is the code that does this?
(I'm new to learning, please help)
Why don't you give it a try first, then ask for help with your solution, it is a much better way to learn
i think you need to go from 17125.331 to 17.125331, then MathCeil this, which outputs 18.0 then you multiply by 10^??? to get as many zero as you need.
Enau #:
i think you need to go from 17125.331 to 17.125331, then MathCeil this, which outputs 18.0 then you multiply by 10^??? to get as many zero as you need.
i think you need to go from 17125.331 to 17.125331, then MathCeil this, which outputs 18.0 then you multiply by 10^??? to get as many zero as you need.
Problem solved, thank you very much
I generated this code:
// thank you Enau #include<Trade\Trade.mqh>// CTrade trade; double say = 1;// void OnTick() { //--------------------------- double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID),_Digits);// double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);// double MyLot = (1025 * 0.30) / 0.0020 ; Print("MyLOT : " ,MyLot); // double net = MyLot / 1000 ; Print("net : ",net); // double kes = ceil(net);Print("kes : ",kes);// double ret = kes / 100 ; Print("ret :",ret);// //--------------------------- if(say==1){say=80; trade.Buy(ret,NULL,Ask,Ask - (100 * _Point),Ask + (300 * _Point),"My Test");// BUY MARKET } } //+------------------------------------------------------------------+
Once again thank you
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
I want to correct a number to a whole number without a comma
MQL5 (MT5)
Example 1:
26275.233
To be converted to: 27000
I mean, round it up to 1000 .
Example 2:
We have: 17125.331 Required to make: 18000
What is the code that does this?
(I'm new to learning, please help)
Thank you all