The TA.Highest()
function is used to calculate the period highest price.
The TA.Highest()
function returns the maximum value of an attribute in the last certain period, excluding the current Bar.
number
TA.Highest(inReal) TA.Highest(inReal, period, attr)
The inReal
parameter is used to specify the K-line data.
inReal
true
{@struct/Record Record} structure arrays, numeric arrays
The period
parameter is used to set the period.
period
false
number
The attr
parameter is used to set the attributes, optionally: Open
, Close
, Low
, High
, Volume
, OpenInterest
.
attr
false
string
function main() {
var records = exchange.GetRecords()
var highestForOpen = TA.Highest(records, 10, "Open")
Log(highestForOpen)
}
def main():
records = exchange.GetRecords()
highestForOpen = TA.Highest(records, 10, "Open")
Log(highestForOpen)
void main() {
auto records = exchange.GetRecords();
auto highestForOpen = TA.Highest(records.Open(), 10);
Log(highestForOpen);
}
For example, if the TA.Highest(records, 30, "High")
function is called, if the period parameter period
is set to 0
, it means to calculate all Bars
of the K-line data passed in by the inReal
parameter; if the attribute parameter attr
is not specified, the K-line data passed in by the inReal
parameter is considered to be an ordinary array.
{@fun/TA/TA.MACD TA.MACD}, {@fun/TA/TA.KDJ TA.KDJ}, {@fun/TA/TA.RSI TA.RSI}, {@fun/TA/TA.ATR TA.ATR}, {@fun/TA/TA.OBV TA.OBV}, {@fun/TA/TA.MA TA.MA}, {@fun/TA/TA.EMA TA.EMA}, {@fun/TA/TA.BOLL TA.BOLL}, {@fun/TA/TA.Alligator TA.Alligator}, {@fun/TA/TA.CMF TA.CMF}, {@fun/TA/TA.Lowest TA.Lowest}
TA.CMF TA.Lowest