Get the K-line period set on the FMZ Quant Trading platform website page when backtesting and running the strategy in live trading, i.e. the default K-line period used when calling the exchange.GetRecords()
function without passing parameters.
K-line period in seconds, integer value in seconds. number
exchange.GetPeriod()
function main() {
// For example, the K-line period set on the website page of the FMZ Quant Trading platform during backtesting and live trading is 1 hour.
var period = exchange.GetPeriod()
Log("K-line period:", period / (60 * 60), "hours")
}
def main():
period = exchange.GetPeriod()
Log("K-line period:", period / (60 * 60), "hours")
void main() {
auto period = exchange.GetPeriod();
Log("K-line period:", period / (60 * 60.0), "hours");
}
{@fun/Market/exchange.GetRecords exchange.GetRecords}
exchange.GetRecords exchange.SetMaxBarLen