MathCeilRoundFloor - MetaTrader 5 Script - MT4/MT5 Resources
Examples of mathematical functions:
//+------------------------------------------------------------------+ //| MathCeilRoundFloor.mq5 | //| Copyright © 2016, Vladimir Karputov | //| http://wmua.ru/slesar/ | http://wmua.ru/slesar/ | //+------------------------------------------------------------------+ #Property Copyright "Copyright © 2016, Vladimir Karputov" #Property association "http://wmua.ru/slesar/" # Property description "MathCeil: Returns the nearest integer value above" # Property description "MathRound: Rounds a value to the nearest integer" # Property description "MathFloor: Returns the nearest integer value from below" # Property description "MathCeil: Returns the nearest integer value above" # Property description "MathRound: Rounds a value to the nearest integer" # Property description "MathFloor: Returns the nearest integer value from below" # Property version "1.003" //+------------------------------------------------------------------+ //|Script program startup function | //+------------------------------------------------------------------+ blank start () { //--- Double price = 1.01561 ; print ( "\n" , "Starting price:" , double to string (price, 5 )); for ( integer i = 0 ; i < 10 ; i++) { Print ( "MathCeil(" , double to string (price, 5 ), ")-> " , MathCeil (price)); print ( "MathWheel(" , Double to String (Price, 5 ), ")->" , MathWheel (Price)); print ( "MathFloor(" , Double to String (Price, 5 ), ")->" , MathFloor (Price)); print ( "" ); price += 1.9 ; } }
It starts with "price" equal to 1.01561 and then increases by 1.9 cyclically .
Attachment download
📎 mathceilroundfloor.mq5 (3.33 KB)
Source: MQL5 #20131
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •