![]() |
algotradelib 0.0.0.9000
C++ header-only library for algorithmic trading
|
The last two values of an indicator line, for testing a crossing. More...
#include <algotradelib/src/strategy/vanilla/signal.hpp>
Public Member Functions | |
| bool | rose_above (const Crossing &other) const |
| Tests whether this line crossed above another on the latest bar. | |
| bool | fell_below (const Crossing &other) const |
| Tests whether this line crossed below another on the latest bar. | |
Public Attributes | |
| math::Scalar | previous_ {0} |
| The value on the previous bar. | |
| math::Scalar | current_ {0} |
| The value on the latest bar. | |
The last two values of an indicator line, for testing a crossing.
Definition at line 21 of file signal.hpp.
|
inline |
Tests whether this line crossed below another on the latest bar.
| other | The other line's last two values. |
Definition at line 41 of file signal.hpp.
|
inline |
Tests whether this line crossed above another on the latest bar.
| other | The other line's last two values. |
Definition at line 32 of file signal.hpp.
| math::Scalar algotradelib::strategy::vanilla::Crossing::current_ {0} |
The value on the latest bar.
Definition at line 25 of file signal.hpp.
Referenced by fell_below(), algotradelib::strategy::vanilla::last_two(), and rose_above().
| math::Scalar algotradelib::strategy::vanilla::Crossing::previous_ {0} |
The value on the previous bar.
Definition at line 23 of file signal.hpp.
Referenced by fell_below(), algotradelib::strategy::vanilla::last_two(), and rose_above().