|
PineForge v0.13.1-379-g9b50973
Deterministic PineScript v6 backtest runtime — C ABI reference
|
Go to the source code of this file.
Macros | |
| #define | QUARTER_MS (15LL * 60LL * 1000LL) |
Enumerations | |
| enum | { kBarCount = 6 , kMaxFills = 5 , kMaxEvents = 128 } |
| enum | { kModeCount = 4 } |
Functions | |
| static void | submit (struct host_state *state, uint32_t intent, double value, uint32_t trigger, double price, const char *label) |
| static int | on_bar (void *user, const pf_bar_t *bar, const pf_native_decision_v1 *at) |
| static pf_native_run_spec_v1 | make_spec (const char *key, double tick) |
| static pf_native_run_spec_ext_v1 | make_ext (uint32_t grid, uint32_t rounding) |
| static int | run_mode (const struct mode *mode) |
| static int | grid_without_a_ladder_is_refused (void) |
| int | main (void) |
Variables | |
| static const pf_bar_t | kBars [] |
| static const struct mode | kModes [] |
| #define QUARTER_MS (15LL * 60LL * 1000LL) |
Definition at line 20 of file native_price_grid_c.c.
| anonymous enum |
| Enumerator | |
|---|---|
| kBarCount | |
| kMaxFills | |
| kMaxEvents | |
Definition at line 32 of file native_price_grid_c.c.
| anonymous enum |
| Enumerator | |
|---|---|
| kModeCount | |
Definition at line 151 of file native_price_grid_c.c.
|
static |
Definition at line 40 of file native_price_grid_c.c.
References pf_native_request_v1::comment, pf_native_request_v1::intent, pf_native_request_v1::intent_value, pf_native_request_v1::label, pf_native_request_v1::p1, PF_NATIVE_API_VERSION, PF_NATIVE_OK, PF_NATIVE_REDUCE_EXPLICIT_UNITS, pf_native_request_v1::reduce_size, strategy_native_submit_v1(), pf_native_request_v1::struct_size, pf_native_request_v1::trigger, and pf_native_request_v1::version.
Referenced by on_bar().
|
static |
Definition at line 58 of file native_price_grid_c.c.
References PF_NATIVE_INTENT_FLATTEN, PF_NATIVE_INTENT_REDUCE, PF_NATIVE_INTENT_TRANSACT, PF_NATIVE_OK, PF_NATIVE_TRIGGER_LIMIT, PF_NATIVE_TRIGGER_MARKET, PF_NATIVE_TRIGGER_STOP, strategy_native_position_v1(), and submit().
|
static |
Definition at line 83 of file native_price_grid_c.c.
References pf_native_run_spec_v1::account_fx, pf_native_run_spec_v1::allowed_open_directions, pf_native_run_spec_v1::basecurrency, pf_native_run_spec_v1::chart_timezone, pf_native_run_spec_v1::close_execution, pf_native_run_spec_v1::currency, pf_native_run_spec_v1::description, pf_native_run_spec_v1::fee_kind, pf_native_run_spec_v1::fee_value, pf_native_run_spec_v1::initial_capital, pf_native_run_spec_v1::input_tf, pf_native_run_spec_v1::point_value, pf_native_run_spec_v1::price_tick, pf_native_run_spec_v1::run_number, pf_native_run_spec_v1::script_tf, pf_native_run_spec_v1::session, pf_native_run_spec_v1::session_key, pf_native_run_spec_v1::struct_size, pf_native_run_spec_v1::ticker, pf_native_run_spec_v1::tickerid, pf_native_run_spec_v1::timezone, pf_native_run_spec_v1::type, and pf_native_run_spec_v1::volumetype.
|
static |
Definition at line 114 of file native_price_grid_c.c.
References pf_native_run_spec_ext_v1::grid_rounding, PF_NATIVE_API_VERSION, PF_NATIVE_SPEC_EXT_PRICE_GRID, pf_native_run_spec_ext_v1::present_mask, pf_native_run_spec_ext_v1::price_grid, pf_native_run_spec_ext_v1::struct_size, and pf_native_run_spec_ext_v1::version.
Referenced by grid_without_a_ladder_is_refused(), and run_mode().
|
static |
Definition at line 154 of file native_price_grid_c.c.
References kBarCount, kBars, kMaxEvents, make_ext(), make_spec(), on_bar(), PF_NATIVE_API_VERSION, PF_NATIVE_EVENT_APPLIED, PF_NATIVE_OK, pf_native_event_v1::resolved_price, strategy_configure_native_ext_v1(), strategy_get_last_error(), strategy_native_events_v1(), strategy_native_host_create_v1(), strategy_native_host_free(), strategy_native_report_free_v1(), strategy_native_run_v1(), and pf_report_t::total_trades.
|
static |
Definition at line 225 of file native_price_grid_c.c.
References make_ext(), make_spec(), on_bar(), PF_NATIVE_API_VERSION, PF_NATIVE_OK, strategy_configure_native_ext_v1(), strategy_native_host_create_v1(), and strategy_native_host_free().
Referenced by main().
| int main | ( | void | ) |
Definition at line 247 of file native_price_grid_c.c.
References grid_without_a_ladder_is_refused(), kModeCount, kModes, and run_mode().
|
static |
Definition at line 24 of file native_price_grid_c.c.
|
static |
Definition at line 141 of file native_price_grid_c.c.
Referenced by main().