|
OpenPine C++ API
C++ wrapper for the OpenPine Pine Script VM
|
Script metadata (type, overlay, title, inputs, alerts) produced by the VM. More...
#include <script_info.hpp>
Public Member Functions | |
| ScriptInfo (const ffi::ScriptInfo *p) | |
| bool | overlay () const |
| Whether the script is drawn on the price chart. | |
| ScriptTypeKind | scriptType () const |
| Script type discriminant. | |
| std::optional< std::string_view > | title () const |
| Script title if present. | |
| std::optional< Indicator > | indicator () const |
| Full indicator payload. Only defined when scriptType() == Indicator. String refs inside the struct are valid as long as this ScriptInfo is alive. | |
| std::optional< Library > | library () const |
| Full library payload. Only defined when scriptType() == Library. | |
| std::optional< Strategy > | strategy () const |
| Full strategy payload. Only defined when scriptType() == Strategy. String refs inside the struct are valid as long as this ScriptInfo is alive. | |
| uintptr_t | inputsLength () const |
| Number of declared user inputs. | |
| std::optional< ScriptInput > | inputAt (uintptr_t index) const |
| Input at the given index, or nullopt if index is out of range. | |
| uintptr_t | alertConditionsLength () const |
| Number of declared alert conditions. | |
| std::optional< std::string_view > | alertConditionTitle (uintptr_t index) const |
| Alert condition title at the given index. | |
| std::optional< std::string_view > | alertConditionMessage (uintptr_t index) const |
| Alert condition message at the given index. | |
Script metadata (type, overlay, title, inputs, alerts) produced by the VM.
The underlying pointer is borrowed from an Instance.
Definition at line 33 of file script_info.hpp.
|
inline |
Definition at line 38 of file script_info.hpp.
|
inline |
Alert condition message at the given index.
Definition at line 129 of file script_info.hpp.
References openpine::detail::optRefToView().
|
inline |
Number of declared alert conditions.
Definition at line 112 of file script_info.hpp.
|
inline |
Alert condition title at the given index.
Definition at line 119 of file script_info.hpp.
References openpine::detail::optRefToView().
|
inline |
Full indicator payload. Only defined when scriptType() == Indicator. String refs inside the struct are valid as long as this ScriptInfo is alive.
Definition at line 69 of file script_info.hpp.
|
inline |
Input at the given index, or nullopt if index is out of range.
Definition at line 103 of file script_info.hpp.
|
inline |
Number of declared user inputs.
Definition at line 98 of file script_info.hpp.
|
inline |
Full library payload. Only defined when scriptType() == Library.
Definition at line 78 of file script_info.hpp.
|
inline |
Whether the script is drawn on the price chart.
Definition at line 44 of file script_info.hpp.
|
inline |
Script type discriminant.
Definition at line 50 of file script_info.hpp.
|
inline |
Full strategy payload. Only defined when scriptType() == Strategy. String refs inside the struct are valid as long as this ScriptInfo is alive.
Definition at line 89 of file script_info.hpp.
|
inline |
Script title if present.
Definition at line 56 of file script_info.hpp.
References openpine::detail::refToView().