Candle attributes manipulation functions.
More...
Candle attributes manipulation functions.
◆ dxf_create_candle_symbol_attributes()
API that allows user to create candle symbol attributes.
- Parameters
-
[in] | base_symbol | The symbols to add |
[in] | exchange_code | Exchange attribute of this symbol |
[in] | period_value | Aggregation period value of this symbol |
[in] | period_type | Aggregation period type of this symbol |
[in] | price | Price ("price" key) type attribute of this symbol. The dxf_candle_price_attribute_t enum defines possible values with dxf_cpa_last being default. For legacy backwards-compatibility purposes, most of the price values cannot be abbreviated, so a one-minute candle of "EUR/USD" bid price shall be specified with EUR/USD{=m,price=bid} candle symbol string. However, the dxf_cpa_settlement can be abbreviated to "s", so a daily candle on "/ES" futures settlement prices can be specified with /ES{=d,price=s} string. |
[in] | session | Session ("tho" key) attribute of this symbol. "tho" key with a value of "true" corresponds to session set to dxf_csa_regular which limits the candle to trading hours only, so a 133 tick candles on "GOOG" base symbol collected over trading hours only can be specified with GOOG{=133t,tho=true} string. Note, that the default daily candles for US equities are special for historical reasons and correspond to the way US equity exchange report their daily summary data. The volume the US equity default daily candle corresponds to the total daily traded volume, while open, high, low, and close correspond to the regular trading hours only. |
[in] | alignment | Alignment ("a" key) attribute of this symbol. The dxf_candle_alignment_attribute_t enum defines possible values with dxf_caa_midnight being default. The alignment values can be abbreviated to the first letter. So, a 1 hour candle on a symbol "AAPL" that starts at the regular trading session at 9:30 am ET can be specified with AAPL{=h,a=s,tho=true} . Contrast that to the AAPL{=h,tho=true} candle that is aligned at midnight and thus starts at 9:00 am. |
[in] | price_level | Price level ("pl" key) attribute of this symbol. The candle price level defines additional axis to split candles within particular price corridor in addition to candle period attribute with the default value NAN. So a one-minute candles of "AAPL" with price level 0.1 shall be specified with AAPL{=m,pl=0.1} . |
[out] | candle_attributes | Pointer to the configured candle attributes struct |
- Returns
- DXF_SUCCESS if candle attributes have been created successfully or DXF_FAILURE on error; dxf_get_last_error can be used to retrieve the error code and description in case of failure; candle_attributes are returned via output parameter
◆ dxf_delete_candle_symbol_attributes()
Free memory allocated by dxf_initialize_candle_symbol_attributes(...) function.
- Parameters
-
[in] | candle_attributes | Pointer to the candle attributes struct |