MCPcopy Create free account
hub / github.com/ScottfreeLLC/AlphaPy / truerange

Function truerange

alphapy/transforms.py:1494–1513  ·  view source on GitHub ↗

r"""Calculate the *True Range* value. Parameters ---------- f : pandas.DataFrame Dataframe with columns ``high`` and ``low``. Returns ------- new_column : pandas.Series (float) The array containing the new feature. References ---------- *True Hi

(f)

Source from the content-addressed store, hash-verified

1492#
1493
1494def truerange(f):
1495 r"""Calculate the *True Range* value.
1496
1497 Parameters
1498 ----------
1499 f : pandas.DataFrame
1500 Dataframe with columns ``high`` and ``low``.
1501
1502 Returns
1503 -------
1504 new_column : pandas.Series (float)
1505 The array containing the new feature.
1506
1507 References
1508 ----------
1509 *True High - True Low* [TS_TR]_.
1510
1511 """
1512 new_column = truehigh(f) - truelow(f)
1513 return new_column
1514
1515
1516#

Callers

nothing calls this directly

Calls 2

truehighFunction · 0.85
truelowFunction · 0.85

Tested by

no test coverage detected