forked from vzhomeexperiments/Include
-
Notifications
You must be signed in to change notification settings - Fork 0
/
06_NormalizeDouble.mqh
36 lines (30 loc) · 1.16 KB
/
06_NormalizeDouble.mqh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//+-------------------------------------------------------------------+
//| 06_NormalizeDouble.mqh |
//| Copyright 2018, Vladimir Zhbanko |
//+-------------------------------------------------------------------+
#property copyright "Copyright 2018, Vladimir Zhbanko"
#property link "https://vladdsm.github.io/myblog_attempt/"
#property strict
// function to return price levels of Resistance and Support
// version 01
// date 11.08.2016
//+-------------------------------------------------------------+//
// Aim of this function is to normalize double prices for calculations
// of stop levels or take profit, etc
//+-------------------------------------------------------------+//
/*
User guide:
1. #include this file to the folder Include
2. When it's required to return Normalized prices just wrap them as follows:
Price = ND(Calculations);
*/
//+------------------------+//
//Normalizing Double prices //
//+------------------------+//
double ND(double val)
{
return(NormalizeDouble(val, Digits()));
}
//+------------------------+//
//End Normalizing double //
//+------------------------+//