Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
// //< 1>
//------------------------------------------------------------------------//<-->
#define time datetime //< 1>
//< 2>
//< 3>
//< 4>
//< 5>
//< 6>
//< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 2>
//------------------------------------------------------------------------//<-->
long ROUND ( double D ) { //< 1>
//< 2>
return ( (int) round ( D ) ) ; //< 3>
//< 4>
//< 5>
//< 6>
} //< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 3>
//------------------------------------------------------------------------//<-->
long ROUND_POINTS ( double D ) { //< 1>
//< 2>
return ( (int) round ( D /_Point ) ) ; //< 3>
//< 4>
//< 5>
//< 6>
} //< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 4>
//------------------------------------------------------------------------//<-->
string ROUND_TO_STRING ( double D , int LENGTH ) { //< 1>
//< 2>
return IntegerToString ( (int) round ( D ) , LENGTH ) ; //< 3>
//< 4>
//< 5>
//< 6>
} //< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 5>
//------------------------------------------------------------------------//<-->
double ROUND_PRICE ( double PRICE , double BASE , double STEP ) { //< 1>
//< 2>
double STEPS = floor ( ( PRICE - BASE ) / STEP ) ; //< 3>
//< 4>
return BASE + STEP * (int) STEPS ; //< 5>
//< 6>
} //< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 6>
//------------------------------------------------------------------------//<-->
time ROUND_TIME ( time A_TIME , time BASE , int STEP ) { //< 1>
//< 2>
double STEPS = floor ( ( A_TIME - BASE ) / STEP ) ; //< 3>
//< 4>
return BASE + STEP * (int) STEPS ; //< 5>
//< 6>
} //< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//
// //< 7>
//------------------------------------------------------------------------//<-->
void OnTick(){} //< 1>
//< 2>
//< 3>
//< 4>
//< 5>
//< 6>
//< 7>
//============================================================================//
// 2022-11-19 06:18 //
//****************************************************************************//