|
void | __dsl_print (const std::string &msg, const any_series_cref &value) |
|
template<typename T > |
sref< T > | ABS (sref< T > data) |
| Returns the absolute value of data. More...
|
|
sref< double > | ACCUMULATE (sref< double > value, const std::function< bool(double)> &func) |
| Computes the sum of all values in data since strategy start for which func returns true. More...
|
|
sref< double > | ACCUMULATE (sref< double > data, size_t period, const std::function< bool(double)> &func) |
| Computes the sum of all values in data over the given period for which func returns true. More...
|
|
sref< double > | AD (sref< double > &open, sref< double > &highs, sref< double > &lows, sref< double > &closes, sref< double > vol) |
|
sref< double > | AD (sref< double > &highs, sref< double > &lows, sref< double > &closes, sref< double > &vol) |
|
sref< double > | ADX (sref< double > highs, sref< double > lows, sref< double > closes, size_t period, size_t period_smooth) |
| Average Directional Index by Welles Wilder. More...
|
|
sref< double > | ATAN (sref< double > arg) |
| Returns the arc-tangent of arg. More...
|
|
double | average (const series< double > &data, size_t period) |
| Returns the the average value of data with given period.
|
|
sref< double > | AVERAGE (sref< double > data, size_t period) |
| Returns the average value over the given period. More...
|
|
sref< double > | AVERAGE (const container &c) |
| Returns the average of the current values of all series in given container c.
|
|
double | average_variable (const series< double > &data, size_t var_period, size_t max_period) |
| Returns the the average value of data with a variable period, where the period is capped at max_period.
|
|
double | average_weighted (const series< double > &data, size_t period) |
| Returns the weighted average value of data over given period.
|
|
series_tuple< double > | BANDPASSFILTER (sref< double > data, size_t period, double bandwidth) |
| Returns Bandpass Filter. More...
|
|
sref< int64_t > | BAR_COUNT (void) |
| Returns the strategy's current bar-count. Returns the same value as strategy::bar_count().
|
|
size_t | bars_since (const series< bool > &series, size_t period) |
| Returns the number of bars since a value in series was 'true' (non-zero), in given period. If no values was true, the function returns tsa::NPOS. You must compare the return value against tsa::NPOS to ensure validity. More...
|
|
size_t | bars_since_highest (const series< double > &series, size_t period) |
| Returns the number of bars since maximum value in series over given period.
|
|
size_t | bars_since_lowest (const series< double > &series, size_t period) |
| Returns the number of bars since the minimum value in series over given period.
|
|
size_t | bars_since_max (const series< double > &series, size_t period) |
| Returns the number of bars since maximum value in series over given period.
|
|
size_t | bars_since_min (const series< double > &series, size_t period) |
| Returns the number of bars since the minimum value in series over given period.
|
|
size_t | bars_since_nth (const series< bool > &series, size_t period, size_t n_count) |
| Returns the number of bars since the n'th value in series was 'true' (non-zero), in given period. A argument of 3 for n_count would return the number of bars since the 3rd 'true' value, counting backwards from the current value. If no values was 'true', the function returns tsa::NPOS. You must compare the return value against tsa::NPOS to ensure validity. More...
|
|
series_tuple< double > | BB (sref< double > highs, sref< double > lows, sref< double > closes, size_t period, double stdev=2.0) |
| Bollinger Bands are volatility bands located a given standard deviation above and below the moving average. They were developed by John Bollinger. More...
|
|
series_tuple< double > | BEAR_POWER (sref< double > highs, sref< double > lows, sref< double > closes, size_t period=13) |
| Returns the 'Bear Power' as developed by Alexander Elder. More...
|
|
series_tuple< double > | BULL_POWER (sref< double > highs, sref< double > lows, sref< double > closes, size_t period=13) |
| Returns the 'Bull Power' as developed by Alexander Elder. More...
|
|
sref< double > | BUTTERWORTHMA (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Butterworth MA, 2 poles. More...
|
|
sref< double > | BUTTERWORTHMA (sref< double > data, size_t period, size_t max_period) |
| Returns Static Butterworth MA, 2 poles. More...
|
|
sref< double > | BUTTERWORTHMA_3P (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Butterworth MA, 3 poles. More...
|
|
sref< double > | BUTTERWORTHMA_3P (sref< double > data, size_t period, size_t max_period) |
| Returns Static Butterworth MA, 3 poles. More...
|
|
double | cap (double number, double max) |
| Returns the lower of number or max.
|
|
sref< double > | CAP (sref< double > value, double cap) |
| Caps value at cap. If value is larger than cap, then cap is returned, else value. More...
|
|
sref< double > | CAP (sref< double > value, sref< double > cap) |
| Caps value at cap. If value is larger than cap, then cap is returned, else value. More...
|
|
double | cap_floor (double number, double min, double max) |
| Returns number if number is between max and min, else max if above, or min if below.
|
|
sref< double > | CCI (sref< double > highs, sref< double > lows, sref< double > closes, size_t period) |
| Returns the Commodity Channel Index (CCI) as developed by Donald Lambert. It represents the difference of the current price and an average over the given period adjusted by the average deviation from the average over the given period. More...
|
|
sref< double > | CGO (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Center of Gravity Oscillator (CGO), dynamic period. More...
|
|
sref< double > | CGO (sref< double > data, size_t period, size_t max_period) |
| Returns Center of Gravity Oscillator (CGO), static period. More...
|
|
sref< double > | CGO_ADAPTIVE (sref< double > data, double alpha) |
| Returns Adapptive Center of Gravity Oscillator (CGO). More...
|
|
sref< double > | CHAIKIN_ADL (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > volumes) |
| 'Chaiking Accumulation Distribution'. Measures the cummulative 'Money Flow Volume' (CHAIKIN_MFV()) into and out of a security. More...
|
|
sref< double > | CHAIKIN_MF (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > volumes, size_t period) |
| 'Chaikin Money Flow'. Represents the 'Money Flow Volume' (CHAIKING_MFV()) over a given period of time. More...
|
|
sref< double > | CHAIKIN_MFV (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > volumes) |
| 'Chaikin Money Flow Volume'. Measures the amount of money flowing into and out of a traded security on a given price bar. More...
|
|
sref< double > | CHAIKIN_OSC (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > volumes, size_t period) |
| Returns the 'Chaikin Oscilator'. More...
|
|
sref< double > | CHAIKIN_VOLAT (sref< double > highs, sref< double > lows, size_t period) |
| Returns the 'Chaikin Volatility'. More...
|
|
sref< std::string > | CONST (const char *value) |
| Returns a contant series of type 'string' with given value. More...
|
|
template<typename T > |
sref< T > | CONST (T value) |
| Returns a contant series reference of given value and type T. More...
|
|
double | const_e (void) |
| Returns the value of E as 2.718281828459045235.
|
|
double | const_phi (void) |
| Returns the value of Phi (Golden Ratio) as 1.61803398874989.
|
|
double | const_pi (void) |
| defines the value of Pi as 3.14159265358979323846264.
|
|
template<typename T > |
sref< T > | CONST_SERIES (const std::vector< T > &values) |
| Returns a series that is constant by copying the data vector values. The series never changes and cannot be changed. More...
|
|
sref< double > | CORRELATION (sref< double > series_a, sref< double > series_b, size_t period) |
| Returns the Correlation between two series. More...
|
|
double | correlation (const series< double > &x, const series< double > &y, size_t period) |
| Returns the correlation coefficient of series and series over given period.
|
|
sref< double > | COS (sref< double > arg) |
| Computes the cosine of arg (measured in radians). More...
|
|
bool | crosses_above (const series< double > &series_a, const series< double > &series_b) |
| Returns true when series_a crosses above series_b.
|
|
bool | crosses_above (const series< double > &series, double threshold) |
| Returns true when series crosses above threshold value.
|
|
sref< bool > | CROSSES_ABOVE (const series< double > &a, const series< double > &b) |
| Returns true if series a crosses above series b. More...
|
|
bool | crosses_below (const series< double > &series_a, const series< double > &series_b) |
| Returns true when series_a crosses below series_b.
|
|
bool | crosses_below (const series< double > &series, double threshold) |
| Returns true when series crosses below threshold value.
|
|
sref< bool > | CROSSES_BELOW (const series< double > &a, const series< double > &b) |
| Returns true if series a crosses below series b. More...
|
|
sref< double > | CYBERCYCLE (sref< double > data, double alpha) |
| Returns Cyber Cycle. More...
|
|
sref< double > | CYBERCYCLE_ADAPTIVE (sref< double > data, double alpha) |
| Returns Adaptive Cyber Cycle. More...
|
|
sref< double > | CYBERCYCLE_P (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Cyber Cycle with period. More...
|
|
sref< double > | CYBERCYCLE_P (sref< double > data, size_t period, size_t max_period) |
| Returns Static Cyber Cycle with period. More...
|
|
sref< double > | DCMA (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic DCMA. More...
|
|
sref< double > | DCMA (sref< double > data, size_t period, size_t max_period) |
| Returns Static DCMA. More...
|
|
sref< double > | DECYCLEROSC (sref< double > data, size_t hp_period1, size_t hp_period2) |
| Returns Decycler Oscillator (CAT). More...
|
|
double | degrees (double radians) |
| Converts radians to degrees.
|
|
sref< double > | DI_DN (sref< double > highs, sref< double > lows, sref< double > closes, size_t period) |
|
sref< double > | DI_UP (sref< double > highs, sref< double > lows, sref< double > closes, size_t period) |
|
sref< double > | DM_DN (sref< double > highs, sref< double > lows, size_t period) |
|
sref< double > | DM_DN_RAW (sref< double > highs, sref< double > low) |
|
sref< double > | DM_UP (sref< double > highs, sref< double > lows, size_t period) |
|
sref< double > | DM_UP_RAW (sref< double > highs, sref< double > low) |
|
sref< double > | DMI (sref< double > highs, sref< double > lows, sref< double > closes, size_t period) |
|
sref< size_t > | DOMINANTCYCLEPERIOD_AC (sref< double > close) |
| Returns Autocorrelation Dominant Cycle Period. More...
|
|
sref< size_t > | DOMINANTCYCLEPERIOD_HILBERT (sref< double > data) |
| Returns Dominant Cycle Period using the Hilbert Transform. More...
|
|
sref< size_t > | DOMINANTCYCLEPERIOD_HOMODYNE (sref< double > data) |
| Returns Dominant Cycle Period using Homodyne Discriminator. More...
|
|
sref< double > | E (void) |
| Returns a value of 'e' as a series of constants (2.718281828459045235).
|
|
sref< double > | EASE_OF_MOV (sref< double > highs, sref< double > lows, sref< double > vol, size_t smooth_period) |
| Ease of Movement. More...
|
|
sref< double > | EASE_OF_MOV_RAW (sref< double > highs, sref< double > lows, sref< double > vol) |
| Ease of Movement (Raw) More...
|
|
sref< double > | EMA (sref< double > data, size_t period) |
| Returns the 'Exponential Moving Average' with the given period. More...
|
|
sref< double > | EMA_WILDER (sref< double > data, size_t period) |
| Exponential moving average by Welles Wilder. Differs from regular EMA(). More...
|
|
sref< double > | EXP (sref< double > power) |
| Raises const 'E' to the given power. The inverse of LN(). More...
|
|
sref< double > | FISHERCGO (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Fisher Center of Gravity Oscillator (FCGO). More...
|
|
sref< double > | FISHERCGO (sref< double > data, size_t period, size_t max_period) |
| Returns Fisher Center of Gravity Oscillator (FCGO). More...
|
|
sref< double > | FISHERRVI (sref< double > op, sref< double > hi, sref< double > lo, sref< double > cl, sref< size_t > period, size_t max_period) |
| Returns Dynamic Fisher Relative Vigour Index (FISHERRVI). More...
|
|
sref< double > | FISHERRVI (sref< double > op, sref< double > hi, sref< double > lo, sref< double > cl, size_t period, size_t max_period) |
| Returns Static Fisher Relative Vigour Index (FISHERRVI). More...
|
|
sref< double > | FISHERTRANSFORM (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Fisher Transform. More...
|
|
sref< double > | FISHERTRANSFORM (sref< double > data, size_t period, size_t max_period) |
| Returns Static Fisher Transform. More...
|
|
bool | float64_comparison (double a, double b, double tolerance=1e-12) |
| Returns true if a is within tolerance or b, where tolerance is a fraction of the largest of the two numbers. More...
|
|
double | floor (double number, double min) |
| Returns the higher of number or min.
|
|
sref< double > | FLOOR (sref< double > value, double floor) |
| Floors value at floor. If value is smaller than floor, then floor is returned, else value. More...
|
|
sref< double > | FLOOR (sref< double > value, sref< double > floor) |
| Floors value at floor. If value is smaller than floor, then floor is returned, else value. More...
|
|
sref< double > | FORCE_INDEX (sref< double > closes, sref< double > volumes, size_t period) |
| Returns the 'Force Index'. It represents a smoothing of the value returned by RAW_FORCE_INDEX(). More...
|
|
sref< double > | FORCE_INDEX_RAW (sref< double > closes, sref< double > volumes) |
| Returns the 'Raw Force Index'. It represents the price change from the previous bar multiplied by volume, to provide a measure of 'force'. Developed by Alexander Elder. More...
|
|
sref< bool > | FP_EQUAL (sref< double > a, sref< double > b, double tolerance=1e-12) |
| Returns 'true' if a and b are identical to within the given tolerance. More...
|
|
double | gaussian (double stdev) |
| Returns a random double with given stdev and mean of 0.0.
|
|
sref< double > | GAUSSIAN (double std_dev) |
| Returns a 'gaussian' random value; A 'unit gaussian' multiplied by the given std_dev.
|
|
template<typename T > |
sref< T > | GET (T &arg_ref) |
| Translates the scalar value referred to by arg_ref (normally referring to a strategy member) into a DSL series for use in DLS. Use this GET() function in conjunction with SET() to interact with non-DSL variables. More...
|
|
double | highest (const series< double > &series, size_t period) |
| Returns the highest value found in series over given .
|
|
sref< double > | HIGHEST (sref< double > data, size_t period) |
| Returns the maximum value in data over the given period.
|
|
series_tuple< double > | HILBERT_OSC (sref< double > data) |
| Returns Ehlers' Hilbet Oscillator. More...
|
|
sref< double > | IFISHERCYBERCYCLE (sref< double > data, double alpha) |
| Returns Inverse Fisher Cyber Cycle. More...
|
|
sref< double > | IFISHERCYBERCYCLE_P (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Inverse Fisher Cyber Cycle with period. More...
|
|
sref< double > | IFISHERCYBERCYCLE_P (sref< double > data, size_t period, size_t max_period) |
| Returns Static Inverse Fisher Cyber Cycle with period. More...
|
|
sref< double > | INNER_PRODUCT (sref< double > x, sref< double > y, size_t period) |
| Returns the 'inner product' of x and y over the given period.
|
|
template<typename T > |
sref< T > | invoke_function (const std::function< T(void)> &member_func) |
| Generic way of invoking an object member function from DSL. The following function returns the strategy's current timestamp: More...
|
|
bool | is_defined (const variant &v) |
| Returns true if the given variant v is 'defined;. See variant::defined().
|
|
bool | is_multiple_of (double value, double tick_size, double tolerance=1e-12) |
| Returns true if value is an exact multiple of min_tick, to within a given tolerance, where the tolerance is interpreted as a fraction of value. This means the larger the value, the larger is the tolerance. More...
|
|
sref< double > | ITREND_RST (sref< double > data) |
| Returns Instantaneous Trendline. More...
|
|
sref< double > | KALMANMA (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Kalman MA. More...
|
|
sref< double > | KALMANMA (sref< double > data, size_t period, size_t max_period) |
| Returns Static Kalman MA. More...
|
|
sref< double > | LAGUERREMA (sref< double > data, double gamma) |
| Returns Laguerre MA. More...
|
|
sref< double > | LAGUERRERSI (sref< double > data, double gamma) |
| Returns Laguerre RSI. More...
|
|
r_tuple | linear_regression (const series< double > &series, size_t period) |
| Returns various regression measures of series against time over given period.
|
|
sref< double > | LN (sref< double > value) |
| Returns the natural logarithm of value. More...
|
|
sref< double > | LOG10 (sref< double > value) |
| Returns the log10 logarithm of value. More...
|
|
double | lowest (const series< double > &series, size_t period) |
| Returns the smallest value found in series over given .
|
|
sref< double > | LOWEST (sref< double > data, size_t period) |
| Returns the minimum value in data over the given period.
|
|
series_tuple< double > | MACD (sref< double > closes, size_t short_period=12, size_t long_period=26, size_t signal_period=9) |
| Moving Average Convergence Divergence (MACD) as developed by Thomas Aspray. It measures the difference between two moving averages. The indicator is often shown as a histogram which is the difference between the MACD and a signal line (moving average of MACD). More...
|
|
series_tuple< double > | MAMA_FAMA (sref< double > data, double fast_limit, double slow_limit) |
| Returns Ehlers' MAMA and FAMA. More...
|
|
sref< double > | MASS_INDEX (sref< double > closes, size_t avg_period=9, size_t avg_of_avg_period=9, size_t ratio_sum_period=25) |
| Mass Index. A measure of range expansion developed by Donald Dorsey. More...
|
|
double | max (const series< double > &series, size_t period) |
| Returns the highest value found in series over given .
|
|
sref< double > | MAX (sref< double > data, size_t period) |
| Returns the maximum value in data over the given period.
|
|
sref< double > | MAX (sref< double > a, sref< double > b) |
| Returns the larger of a or b. More...
|
|
sref< double > | MAX (const container &c) |
| Returns the maximum current values of all series in given container c.
|
|
sref< double > | MAX (sref< double > data, sref< size_t > dynamic_period, size_t max_period) |
| Returns the largest value in data over the given dynamic_period. max_period is the maximum value that dynamic_period is allowed to have. More...
|
|
date_time | max (const date_time &left, const date_time &right) |
| Determines the larger (later) of the two time-points. Will return a value even if both time-points are identical. More...
|
|
sref< double > | MEAN (const container &c) |
| Alias for AVERAGE(const container& c).
|
|
sref< double > | MEAN_DEV (sref< double > data, sref< double > custom_mean, size_t period) |
| Returns the average deviation between values in and the current value of custom_mean over the given period. More...
|
|
sref< double > | MEAN_DEV (sref< double > data, size_t period) |
| Returns the average deviation between the values in and their average over the given period. More...
|
|
sref< double > | MEAN_DEV2 (sref< double > data, sref< double > custom_mean, size_t period) |
| Returns the average deviation squared between values in and the current value of custom_mean over the given period. More...
|
|
sref< double > | MEAN_DEV2 (sref< double > data, size_t period) |
| Returns the average deviation squared between the values in and their average over the given period. More...
|
|
sref< double > | MEDIAN (sref< double > data, size_t period) |
| Returns the median of data over the given period. More...
|
|
sref< double > | MFI (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > vol, size_t period=14) |
| Money Flow Index. More...
|
|
double | min (const series< double > &series, size_t period) |
| Returns the smallest value found in series over given .
|
|
sref< double > | MIN (sref< double > data, size_t period) |
| Returns the minimum value in data over the given period.
|
|
sref< double > | MIN (sref< double > a, sref< double > b) |
| Returns the smaller of a or b. More...
|
|
sref< double > | MIN (const container &c) |
| Returns the minimum current values of all series in given container c.
|
|
sref< double > | MIN (sref< double > data, sref< size_t > dynamic_period, size_t max_period) |
| Returns the smallest value in data over the given dynamic_period. max_period is the maximum value that dynamic_period is allowed to have. More...
|
|
date_time | min (const date_time &left, const date_time &right) |
| Determines the smaller (earlier) of the two time-points. Will return a value even if both time-points are identical. More...
|
|
double | momentum (const series< double > &cl, size_t period) |
| Returns the difference between the current value of the series and the value period bars ago. More...
|
|
sref< double > | NET_PROFIT (void) |
| Returns the strategy's current 'net profit'.
|
|
sref< bool > | operator! (auto_cast_bool_series_cref x) |
| Unary 'logical not' operator.
|
|
sref< bool > | operator!= (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
bool | operator!= (const order_ref &lhs, const order_ref &rhs) |
| comparison operator
|
|
sref< double > | operator% (numeric_series_cref a, numeric_series_cref b) |
| Floating point modulo.
|
|
sref< bool > | operator&& (auto_cast_bool_series_cref a, auto_cast_bool_series_cref b) |
| Logical-and. Casts a and b to boolean before checking if both are true.
|
|
sref< double > | operator* (numeric_series_cref a, numeric_series_cref b) |
| Multiplies a by b.
|
|
sref< double > | operator+ (numeric_series_cref a, numeric_series_cref b) |
| Adds a and b.
|
|
date | operator+ (const date &date, const duration &num_days) |
| Adds num_days to self. The microsecond property of the given timespan must be zero or an exception is thrown. More...
|
|
sref< double > | operator- (numeric_series_cref a, numeric_series_cref b) |
| Subtracts b from a.
|
|
sref< double > | operator- (numeric_series_cref) |
| Unary minus operator.
|
|
date | operator- (const date &Left, const duration &numDays) |
| Subtracts num_days from self. The microsecond property of the given timespan must be zero or an exception is thrown. More...
|
|
sref< double > | operator/ (numeric_series_cref a, numeric_series_cref b) |
| Divides a by b.
|
|
sref< bool > | operator< (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
std::ostream & | operator<< (std::ostream &stream, const transaction &t) |
| Writes human readable transaction information to stream. More...
|
|
std::ostream & | operator<< (std::ostream &stream, const duration &ts) |
| Writes ts to stream as a string.
|
|
sref< bool > | operator<= (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
sref< bool > | operator== (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
bool | operator== (const order_ref &lhs, const order_ref &rhs) |
| comparison operator
|
|
sref< bool > | operator> (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
sref< bool > | operator>= (numeric_series_cref a, numeric_series_cref b) |
| comparison.
|
|
log_type_t | operator| (log_type_t lhs, log_type_t rhs) |
| Allows multiple LogType values to be combined. More...
|
|
open_db_flag_type | operator| (open_db_flag_type left_flag, open_db_flag_type right_flag) |
| Allows multiple fast::database constructor flags to be combined. More...
|
|
sref< bool > | operator|| (auto_cast_bool_series_cref a, auto_cast_bool_series_cref b) |
| Logical-or. Casts a and b to boolean before checking if either is true.
|
|
sref< double > | PHI (void) |
| Returns a value of 'phi' as a series of constants (1.61803398874989).
|
|
sref< double > | PI (void) |
| Returns a value of 'pi' as a series of constants (3.14159265358979323846264).
|
|
void | populate_with_change_ratios (series< double > &target, series< double > &source, size_t period) |
| Populates the target series with changes from one value to the next of the source series for the given period. The function throws an exception if it encounters 0.0 or negative numbers. This function first empties the target series. IMPORTANT: The target series must NOT be 'managed'. See series<t>::is_managed(). The target series will contain 1 item less than the source series. More...
|
|
void | populate_with_changes (series< double > &target, const series< double > &source, size_t period) |
| Populates the target series with changes from one value to the next of the source series for the given period. This function first empties the target series. IMPORTANT: The target series must NOT be 'managed'. See series<t>::is_managed(). The target series will contain 1 item less than the source series. More...
|
|
sref< double > | POW (sref< double > base, double exponent) |
| Returns base raised to the power of exponent. More...
|
|
sref< double > | POW_DYN (sref< double > base, sref< double > exponent) |
| Returns base raised to the power of exponent. More...
|
|
double | radians (double degrees) |
| Converts degrees to radians.
|
|
double | rand (double low=0.0, double high=1.0) |
| Returns a random double between low and high (inclusive)
|
|
sref< double > | RAND (double low=0.0, double high=1.0) |
| Returns a (uniformly distributed) random value between low and high.
|
|
bool | rand_bool (double probability_of_true=0.5) |
| Returns a random boolean value with a given probability_of_true.
|
|
sref< bool > | RAND_BOOL (double true_probability=0.5) |
| Returns a random boolean value with a given true_probability.
|
|
int | rand_int (int low, int high) |
| Returns a random integer between low and high (inclusive)
|
|
sref< int > | RAND_INT (int low, int high) |
| Returns a (uniformly distributed) random integer between low and high.
|
|
std::string | rand_string (size_t min_len=10, size_t max_len=10) |
| Returns a random character string with a length between min_len to max_len.
|
|
sref< std::string > | RAND_STRING (size_t min_len=15, size_t max_len=15) |
| Returns a random string of random length between min_len and max_len.
|
|
double | rate_of_change (const series< double > &series, size_t period) |
| Returns the 'ROC' which is the percentage difference between the current value of the series and the value period bars ago. More...
|
|
sref< double > | REGRESSION_LINE (sref< double > x, sref< double > y, size_t period) |
| Regression 'line end point' of x against y, over given period. More...
|
|
sref< double > | REGRESSION_LINE (sref< double > data, size_t period) |
| Regression 'line end point' of data against linear time, over given period. More...
|
|
sref< double > | REGRESSION_RSQUARE (sref< double > x, sref< double > y, size_t period) |
| Regression 'r-square' of x against y, over given period. More...
|
|
sref< double > | REGRESSION_RSQUARE (sref< double > data, size_t period) |
| Regression 'r-square' of data against linear time, over given period. More...
|
|
sref< double > | REGRESSION_SLOPE (sref< double > x, sref< double > y, size_t period) |
| Regression 'slope' of x against y, over given period. More...
|
|
sref< double > | REGRESSION_SLOPE (sref< double > data, size_t period) |
| Regression 'slope' of data against linear time, over given period. More...
|
|
sref< double > | REGRESSION_Y_INTERCEPT (sref< double > x, sref< double > y, size_t period) |
| Regression 'y intercept' of x against y, over given period. More...
|
|
sref< double > | REGRESSION_Y_INTERCEPT (sref< double > data, size_t period) |
| Regression 'y-intercept' of data against linear time, over given period. More...
|
|
double | relative_strenght (const series< double > &series_a, const series< double > &series_b, size_t period) |
| Returns the 'relative strength', which is a measure of how series_a out-performed or under-performed series_b over the given period. More...
|
|
sref< double > | ROLLING_SUM (sref< double > value) |
| Returns the rolling sum of all value items since the start of the strategy. More...
|
|
sref< double > | ROOFINGFILTER (sref< double > data, size_t lp_period, size_t hp_period) |
| Returns Roofing Filter. More...
|
|
sref< double > | RSI (sref< double > data, size_t period) |
| Relative Strength Index. More...
|
|
sref< double > | RSI_MOD (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Modified RSI. More...
|
|
sref< double > | RSI_MOD (sref< double > data, size_t period, size_t max_period) |
| Returns Static Modified RSI. More...
|
|
sref< double > | RVI (sref< double > op, sref< double > hi, sref< double > lo, sref< double > cl, sref< size_t > period, size_t max_period) |
| Returns Dynamic Relative Vigour Index (RVI). More...
|
|
sref< double > | RVI (sref< double > op, sref< double > hi, sref< double > lo, sref< double > cl, size_t period, size_t max_period) |
| Returns Static Relative Vigour Index (RVI). More...
|
|
sref< double > | RVI_ADAPTIVE (sref< double > op, sref< double > hi, sref< double > lo, sref< double > cl, double alpha) |
| Returns Adaptive Relative Vigour Index (RVI). More...
|
|
double | safe_divide (double numerator, double denominator, double denominator_adjust=10e-9) |
| This function avoids 'division by zero' errors by adding denominator_adjust to denominator when it is equal to 0.0.
|
|
sref< double > | SAFE_DIVIDE (sref< double > numerator, sref< double > denominator, double denominator_adjust=1e-9) |
| Divides numerator by denominator. If denominator is 0.0, then denominator_adjust is used instead of denominator to avoid division by zero. More...
|
|
sref< double > | SAM (sref< double > data, double alpha, size_t cutoff) |
| Returns Smoothed Adative Momentum (SAM). More...
|
|
template<typename T > |
scalar_assigner< T > | SET (T &var_ref) |
|
template<typename T > |
sref< T > | SHIFT (const series< T > &series, size_t shift_by) |
| Shifts the series by shift_by positions. This is the equivalent of using series<T>::operator(). More...
|
|
template<typename T > |
sref< T > | SHIFT (const sref< T > &series, size_t shift_by) |
| Shifts the series by shift_by positions. This is the equivalent of using series_cref<T>::operator(). More...
|
|
template<typename T > |
const series< T > | shift_by (const series< T > &in_series, size_t shift_by) |
| Returns a series that is a 'shifted' version of the given in_series argument. The returned series will be shifted by shift places to the right. For a shift value of 3, the current value in the returned series will correspond to the value 3 bars ago in in_series. This function does not allow shifting to the left (into the future). For shifting series 'into the future', see in_stream::set_forward_shift(). More...
|
|
sref< double > | SIN (sref< double > arg) |
| Computes the sine of arg (measured in radians). More...
|
|
series_tuple< double > | SINEWAVE_RST (sref< double > data) |
| Returns Ehlers' Sinewave. More...
|
|
sref< double > | SMA (sref< double > data, size_t period) |
| Returns the Symmetric Moving Average over the given period. (Alias for AVERAGE()) More...
|
|
sref< double > | SNR_HILBERT (sref< double > high, sref< double > low, size_t period) |
| Returns Static SNR (HILBERT). More...
|
|
sref< double > | SNR_RST (sref< double > high, sref< double > low) |
| Returns Signal to Noise Ratio (SNR). More...
|
|
double | sqrt (double arg) |
| Returns the square root of the given argument. Throws an exception if given arg is smaller than 0.0.
|
|
sref< double > | SQRT (sref< double > value) |
| Returns the square root of value. More...
|
|
double | square (double arg) |
| Returns a square of the given argument. Same as std::pow(arg,2).
|
|
sref< double > | SRSI (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic SRSI. More...
|
|
sref< double > | SRSI (sref< double > data, size_t period, size_t max_period) |
| Returns Static SRSI. More...
|
|
double | stdev (const series< double > &data, size_t period) |
| Returns the population standard deviation in data over period.
|
|
sref< double > | STDEVP (sref< double > data, size_t period) |
| Returns the population standard deviation of data over given period. More...
|
|
series_tuple< double > | STOCH (sref< double > highs, sref< double > lows, sref< double > closes, size_t period, size_t k_smooth_period=3, size_t d_smooth_period=3) |
| Returns the 'smoothed' Stochastic K and D where K is a smoothed version of the Stochastic-Oscillator (STOCH_OSC()) and D is a smoothed version on K. More...
|
|
sref< double > | STOCH_OSC (sref< double > highs, sref< double > lows, sref< double > closes, size_t period) |
| Returns the Stochastic Oscillator (raw Stochastic) as developed by George C. Lane. It measures the current price in relation to the given period's price range. More...
|
|
sref< double > | STOCHASTIC_MOD (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Modified Stochastic. More...
|
|
sref< double > | STOCHASTIC_MOD (sref< double > data, size_t period, size_t max_period) |
| Returns Static Modified Stochastic. More...
|
|
sref< double > | SUM (sref< double > data, size_t period) |
| Returns the sum of data over the given period. More...
|
|
sref< double > | SUM (sref< double > data, sref< size_t > dynamic_period, size_t max_period) |
| Returns the sum of data over the given dynamic_period. max_period is the maximum value that dynamic_period is allowed to have. More...
|
|
sref< double > | SUM (const container &c) |
| Returns the sum of the current values of all series in given container c.
|
|
sref< double > | SUM_DEV (sref< double > ser, sref< double > mean, size_t period) |
|
sref< double > | SUM_DEV (sref< double > data, size_t period) |
| Returns the 'sum of deviations from mean' over the given period.
|
|
sref< double > | SUM_DEV2 (sref< double > data, sref< double > custom_mean, size_t period) |
| Returns the 'sum of deviations squared from custom_mean' over the given period.
|
|
sref< double > | SUM_DEV2 (sref< double > data, size_t period) |
| Returns the 'sum of deviations squared from mean' over the given period.
|
|
sref< double > | SUM_NEG (sref< double > data, size_t period) |
| Returns the 'sum of negatives' over the given period. More...
|
|
sref< double > | SUM_POS (sref< double > data, size_t period) |
| Returns the 'sum of positives' over the given period. More...
|
|
sref< double > | SUM_SQ (sref< double > data, size_t period) |
| Returns the 'sum of squares' over the given period. More...
|
|
sref< double > | SUM_XY (sref< double > x, sref< double > y, size_t period) |
| Returns the 'sum of x*y' over the given period.
|
|
sref< double > | SUPERSMOOTHERMA (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Supersmoother MA. More...
|
|
sref< double > | SUPERSMOOTHERMA (sref< double > data, size_t period, size_t max_period) |
| Returns Static Supersmoother MA. More...
|
|
sref< double > | SUPERSMOOTHERMA_3P (sref< double > data, sref< size_t > period, size_t max_period) |
| Returns Dynamic Supersmoother MA, 3 poles. More...
|
|
sref< double > | SUPERSMOOTHERMA_3P (sref< double > data, size_t period, size_t max_period) |
| Returns Static Supersmoother MA, 3 poles. More...
|
|
sref< double > | TAN (sref< double > arg) |
| Computes the tangent of arg, measured in radians. More...
|
|
double | tick_round (double price, double tick_size, tick_round_flag_t flag=closest) |
| Rounds a given price to the nearest multiple of min_tick. By default if rounds to the closest multiple. Note that that order prices are automatically rounded by the system if the contract::tick() member is called. Automatic rounding can be disabled via the contract::tick() member's second parameter. More...
|
|
sref< date_time > | TIMESTAMP (void) |
| Returns the strategy's current timestamp (The timestamp of the current bar).
|
|
sref< bool > | TO_BOOL (any_series_cref x) |
| Casts x to type 'bool'.
|
|
sref< date > | TO_DATE (string_series_cref x) |
| Casts x to type 'tsa::date'.
|
|
sref< date_time > | TO_DATE_TIME (string_series_cref x) |
| Casts x to type 'tsa::date_time'.
|
|
sref< double > | TO_DOUBLE (numeric_series_cref x) |
| Casts x to type 'double'.
|
|
sref< double > | TO_DOUBLE (bool_series_cref x) |
| Casts x to type 'double'.
|
|
sref< double > | TO_DOUBLE (string_series_cref x) |
| Casts x to type 'double'.
|
|
sref< int > | TO_INT (numeric_series_cref x) |
| Casts x to type 'int'.
|
|
sref< int > | TO_INT (bool_series_cref x) |
| Casts x to type 'int'.
|
|
sref< int > | TO_INT (string_series_cref x) |
| Casts x to type 'int'.
|
|
sref< int64_t > | TO_LONG (numeric_series_cref x) |
| Casts x to type 'long'.
|
|
sref< int64_t > | TO_LONG (bool_series_cref x) |
| Casts x to type 'long'.
|
|
sref< int64_t > | TO_LONG (string_series_cref x) |
| Casts x to type 'long'.
|
|
std::string | to_string (type_t type) |
| Converts type to a string. More...
|
|
sref< std::string > | TO_STRING (any_series_cref x) |
| Casts x to type 'std::string'.
|
|
sref< double > | TP (sref< double > highs, sref< double > lows, sref< double > closes) |
| Alias for TYPICAL_PRICE(). More...
|
|
template<typename T > |
sref< T > | TRANSFORM_SERIES (sref< T > data, size_t period, const std::function< T(const T *, size_t)> &transform_function) |
| Returns a transformation of the values in data over the given period, by applying transform_function, which is usually a lambda function. The pointer to the front of data, together with period are passed as argument to the transform_function. More...
|
|
template<typename T0 , typename T1 > |
sref< T0 > | TRANSFORM_SERIES (sref< T0 > data0, sref< T1 > data1, size_t period, const std::function< T0(const T0 *, const T1 *, size_t)> &transform_function) |
| Returns a transformation of the values in data0 and data1 over the given period, by applying transform_function, which is usually a lambda function. The pointer to the front of data0 and data1, together with period are passed as argument to the transform_function, which is usually a lambda function. The following code calculates a sum over a dynamic period. More...
|
|
series_tuple< double > | TRIX (sref< double > closes, size_t smooth_1_period=15, size_t smooth_2_period=15, size_t smooth_3_period=15, size_t signal_period=9) |
| TRIX. Represents the percent-rate-of-change of a triple exponentially smoothed average. Developed by Jack Hutson. More...
|
|
double | true_range (const series< double > &hi, const series< double > &lo, const series< double > &cl) |
| Returns the 'true range' where the 'range' is the difference between the bar's high and low price, and the 'true range' is the range adjusted to include any overnight gaps. More...
|
|
sref< double > | TRUE_RANGE (sref< double > highs, sref< double > lows, sref< double > closes) |
| Returns the 'true range'. More...
|
|
int64_t | trunc (double value) |
| Returns the integer portion of value.
|
|
sref< double > | TSI (sref< double > series, size_t smooth_1_period=25, size_t smooth_2_period=13) |
| 'True Strenght Indicator'. A momentum oscillator developed by William Blau. More...
|
|
bool | turns_neg (const series< double > &series) |
| Returns true when seris crosses below 0.0.
|
|
bool | turns_pos (const series< double > &series) |
| Returns true when series crosses above 0.0.
|
|
sref< double > | TWIGGS_MF (sref< double > highs, sref< double > lows, sref< double > closes, sref< double > vol, size_t period=14) |
| Twiggs Money Flow. More...
|
|
sref< double > | TYPICAL_PRICE (sref< double > highs, sref< double > lows, sref< double > closes) |
| Returns the 'typical price'. ((hi + lo + cl) / 3.0). More...
|
|
double | typical_price (double high, double low, double close) |
| Returns the 'typical price', which is the average of a bar's high,low,close prices. (high + low + close) / 3.0. More...
|
|
sref< double > | ULCER_INDEX (sref< double > closes, size_t period=14) |
| Ulcer Index. More...
|
|
sref< double > | ULTIMATE_OSC (sref< double > highs, sref< double > lows, sref< double > closes, size_t short_period=7, size_t medium_period=14, size_t long_period=28) |
| 'Ultimate Oscillator'. Developed by Larry Williams.It is a momentum indicators designed to capture the momentum across multiple timeframes. More...
|
|
double | unit_gaussian (void) |
| Returns a random double with a standard deviation of 1.0 and a mean of 0.0.
|
|
sref< double > | UNIT_GAUSSIAN (void) |
| Returns a 'unit gaussian'; A random value with a standard deviation of 1.0 and a mean of 0.0.
|
|
double | variance (const series< double > &data, size_t period) |
| Returns the population variance in data over period.
|
|
sref< double > | VARP (sref< double > data, size_t period) |
| Returns the population variance of data over given period. More...
|
|
void | verify_non_zero (size_t value) |
|
void | verify_non_zero (double value) |
|
sref< size_t > | VERIFY_PERIOD (sref< size_t > period, size_t max_period) |
| Used to verify and potentially correct a value for dynamic period in DSL functions. The returned value is capped at max_period, and set to 2 if smaller than 2. More...
|
|
sref< double > | VOLATILITY (sref< double > data, size_t period, size_t num_intervals_in_year) |
| Returns the annualized volatility over the given period. More...
|
|
double | volatility (const series< double > &series, size_t period) |
| This function calculates a measure of volatility by analyzing the price changes between bars over the given period. This value is then 'annualized'. For the 'annualization' to be accurate, the function must be given the correct numberOfIntervalsInYear. For 'daily' price series, the default numberOfIntervalsInYear of 252 can be used, which corresponds to the number of trading days (in the United States) per year. More...
|
|
sref< double > | VOLATILITY_ALT (sref< double > data, size_t period) |
| Alternative Volatility calculated as: STDEVP(close, period) / AVERAGE(close, period);. More...
|
|
sref< double > | WILLIAMS_R (sref< double > highs, sref< double > lows, sref< double > closes, size_t period=14) |
| Returns the 'Williams R' indicator as developed by Larry Williams. It represents the inverse of the stochastic indicator STOCH(). More...
|
|
double | WMA (const series< double > &data, size_t period) |
| Returns the weighted average value of data over given period.
|
|
sref< bool > | X_ABOVE (const series< double > &a, const series< double > &b) |
| alias for CROSSES_ABOVE.
|
|
sref< bool > | X_BELOW (const series< double > &a, const series< double > &b) |
| alias for CROSSES_bELOW.
|
|