MathCeilRoundFloor

Author: Copyright © 2016, Vladimir Karputov
0 Views
0 Downloads
0 Favorites
MathCeilRoundFloor
ÿþ//+------------------------------------------------------------------+

//|                                           MathCeilRoundFloor.mq5 |

//|                              Copyright © 2016, Vladimir Karputov |

//|                                           http://wmua.ru/slesar/ |

//+------------------------------------------------------------------+

#property copyright "Copyright © 2016, Vladimir Karputov"

#property link      "http://wmua.ru/slesar/"

#property description "MathCeil: >72@0I05B 1;8609H55 A25@EC F5;>5 G8A;>2>5 7=0G5=85"

#property description "MathRound: :@C3;O5B G8A;> 4> 1;8609H53> F5;>3>"

#property description "MathFloor: >72@0I05B 1;8609H55 A=87C F5;>5 G8A;>2>5 7=0G5=85"

#property description "MathCeil: Returns integer numeric value closest from above"

#property description "MathRound: Rounds of a value to the nearest integer"

#property description "MathFloor: Returns integer numeric value closest from below"

#property version   "1.003"

//+------------------------------------------------------------------+

//| Script program start function                                    |

//+------------------------------------------------------------------+

void OnStart()

  {

//---

   double price=1.01561;

   Print("\n","Start price: ",DoubleToString(price,5));

   for(int i=0;i<10;i++)

     {

      Print("MathCeil(",DoubleToString(price,5),") ->  ",MathCeil(price));

      Print("MathRound(",DoubleToString(price,5),") ->  ",MathRound(price));

      Print("MathFloor(",DoubleToString(price,5),") ->  ",MathFloor(price));

      Print("");

      price+=1.9;

     }

  }

//+------------------------------------------------------------------+

Comments