PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
ta_lookback.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <cstdint>
4
5namespace pineforge::detail {
6
7// A host captures the calling thread's setting at construction. While the
8// host runs, its value is in force for any call sites it constructs.
9std::int64_t ta_lookback_limit() noexcept;
10std::int64_t exchange_ta_lookback_limit(std::int64_t maximum) noexcept;
11
13public:
14 explicit TaLookbackScope(std::int64_t maximum) noexcept
15 : previous_(exchange_ta_lookback_limit(maximum)) {}
19
20private:
21 std::int64_t previous_;
22};
23
24} // namespace pineforge::detail
TaLookbackScope(std::int64_t maximum) noexcept
TaLookbackScope(const TaLookbackScope &)=delete
TaLookbackScope & operator=(const TaLookbackScope &)=delete
std::int64_t exchange_ta_lookback_limit(std::int64_t maximum) noexcept
std::int64_t ta_lookback_limit() noexcept