Set the maximum length of the K-line.
exchange.SetMaxBarLen(n)
The parameter n
is used to specify the maximum K-line length.
n
true
number
function main() {
exchange.SetMaxBarLen(50)
var records = exchange.GetRecords()
Log(records.length, records)
}
def main():
exchange.SetMaxBarLen(50)
r = exchange.GetRecords()
Log(len(r), r)
void main() {
exchange.SetMaxBarLen(50);
auto r = exchange.GetRecords();
Log(r.size(), r[0]);
}
The exchange.SetMaxBarLen()
function affects two aspects for cryptocurrency strategy runtime:
{@fun/Market/exchange.GetRecords exchange.GetRecords}
exchange.GetPeriod exchange.GetRawJSON