TA.Highest
The TA.Highest() function is used to calculate the highest price within a specified period.
TA.Highest(inReal)
TA.Highest(inReal, period, attr)Examples
javascript
function main() {
var records = exchange.GetRecords()
var highestForOpen = TA.Highest(records, 10, "Open")
Log(highestForOpen)
}
python
def main():
records = exchange.GetRecords()
highestForOpen = TA.Highest(records, 10, "Open")
Log(highestForOpen)
c++
void main() {
auto records = exchange.GetRecords();
auto highestForOpen = TA.Highest(records.Open(), 10);
Log(highestForOpen);
}Returns
| Type | Description |
number | The |
Arguments
| Name | Type | Required | Description |
inReal |
| Yes | The |
period | number | No | The |
attr | string | No | The |
See Also
Remarks
For example, when calling TA.Highest(records, 30, "High") function: If the period parameter period is set to 0, it calculates the highest value of all Bars in the K-line data passed by the inReal parameter; If the attribute parameter attr is not specified, the data passed by the inReal parameter is treated as a regular numeric array.