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
37
38
39
40
41
/// Convert a pip count to the cTrader relative SL/TP protocol value.
///
/// cTrader relative values are in 1/100000 of a price unit.
/// 1 pip on a 5-decimal pair = 10 points = 0.00010 price units
/// = 0.00010 × 100000 = 10.0 → round to 10000 (because 1 pip = 10 points)
///
/// The simple formula: `pips × 10 × 100` = `pips × 1000` for a standard pair.
///
/// Examples:
/// ```
/// use ctrader::order::pips_to_points;
/// assert_eq!(pips_to_points(50), 500_000); // 50 pips
/// assert_eq!(pips_to_points(10), 100_000); // 10 pips
/// ```
///
///
///
/// Convert an absolute price distance to the cTrader relative protocol value.
///
/// `price_distance` — the distance in price units (e.g. 0.0050 for 50 pips on EURUSD).
///
/// Formula: `price_distance × 100_000` rounded to nearest integer.
///
///
///