exchange.GetPeriod
Retrieves the K-line period configured on the FMZ Quant Trading platform website page when running a strategy in backtesting or live trading, i.e., the default K-line period used when calling the exchange.GetRecords() function without passing any parameters.
exchange.GetPeriod()Examples
Read the default K-line period (in seconds) set on the page.
javascript
function main() {
var period = exchange.GetPeriod()
Log("K-line period (seconds)", period)
// Output: K-line period (seconds) 3600 (the K-line period set on the page is 1 hour)
}
python
def main():
period = exchange.GetPeriod()
Log("K-line period (seconds)", period)
# Output: K-line period (seconds) 3600 (the K-line period set on the page is 1 hour)
rust
fn main() {
let period = exchange.GetPeriod();
Log!("K-line period (seconds)", period);
// Output: K-line period (seconds) 3600 (the K-line period set on the page is 1 hour)
}Returns
| Type | Description |
number | The number of seconds of the K-line period, an integer value, in seconds. |
See Also