Module Expr Str FunctionDef arguments args NameParam NameParam defaults body Assert CompareEq Call NameLoad NameLoad Call NameLoad NameLoad Assign NameStore ListLoad For NameStore Call NameLoad Call NameLoad NameLoad body Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad If BoolOpAnd CompareIsNot NameLoad NameLoad CompareIsNot NameLoad NameLoad body Assign NameStore BinOpSub NameLoad NameLoad orelse Assign NameStore NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareGt Call NameLoad NameLoad Call NameLoad NameLoad body If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Call NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Slice BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad orelse If CompareGt Call NameLoad NameLoad Call NameLoad NameLoad body If NameLoad body Assign NameStore SubscriptLoad NameLoad Slice Num Call NameLoad NameLoad orelse Assign NameStore SubscriptLoad NameLoad Slice BinOpSub Call NameLoad NameLoad Call NameLoad NameLoad Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad SubscriptLoad NameLoad Slice NameLoad NameLoad CompareGt NameLoad Num Assign NameStore Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad Lambda arguments args NameParam defaults CompareNotEq NameLoad Num NameLoad Assign NameStore NameLoad For NameStore NameLoad body If BoolOpAnd CompareIsNot NameLoad NameLoad UnaryOpNot Call NameLoad NameLoad Call NameLoad NameLoad body AugAssignAdd NameStore Num Assign NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Lambda arguments args NameParam defaults CompareGt NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad NameLoad NameLoad Lambda arguments args NameParam defaults CompareLt NameLoad Num decorator_list
N/A N/A 
.. moduleauthor:: Gabriel Martin Becedillas Ruiz <gabriel.becedillas@gmail.com>
 compute_diff N/A N/A values1 values2 N/A N/A N/A N/A N/A len values1 N/A len values2 N/A ret N/A N/A i N/A range N/A len values1 N/A N/A v1 N/A values1 N/A i N/A v2 N/A values2 N/A i N/A N/A N/A v1 None N/A v2 None N/A N/A diff N/A v1 v2 N/A N/A diff None N/A N/A N/A ret append diff N/A ret N/A _get_stripped N/A N/A values1 values2 alignLeft N/A N/A N/A N/A N/A len values1 N/A len values2 N/A N/A alignLeft N/A N/A values1 N/A values1 N/A 0 N/A len values2 N/A N/A values1 N/A values1 N/A N/A N/A len values1 N/A len values2 N/A N/A N/A N/A len values2 N/A len values1 N/A N/A alignLeft N/A N/A values2 N/A values2 N/A 0 N/A len values1 N/A N/A values2 N/A values2 N/A N/A N/A len values2 N/A len values1 N/A N/A values1 values2 N/A _cross_impl N/A N/A values1 values2 start end signCheck N/A N/A N/A N/A values1 values2 N/A _get_stripped N/A values1 N/A start end N/A values2 N/A start end N/A start 0 N/A ret 0 N/A diffs N/A compute_diff values1 values2 N/A diffs N/A filter N/A N/A N/A x N/A N/A x 0 diffs N/A prevDiff None N/A diff diffs N/A N/A N/A N/A prevDiff None N/A N/A signCheck prevDiff N/A signCheck diff N/A N/A ret 1 N/A prevDiff diff N/A ret N/A cross_above N/A N/A values1 values2 start end N/A -2 None N/A N/A Checks for a cross above conditions over the specified period between two DataSeries objects.

    It returns the number of times values1 crossed above values2 during the given period.

    :param values1: The DataSeries that crosses.
    :type values1: :class:`pyalgotrade.dataseries.DataSeries`.
    :param values2: The DataSeries being crossed.
    :type values2: :class:`pyalgotrade.dataseries.DataSeries`.
    :param start: The start of the range.
    :type start: int.
    :param end: The end of the range.
    :type end: int.

    .. note::
        The default start and end values check for cross above conditions over the last 2 values.
     N/A N/A _cross_impl values1 values2 start end N/A N/A N/A x N/A N/A x 0 N/A cross_below N/A N/A values1 values2 start end N/A -2 None N/A N/A Checks for a cross below conditions over the specified period between two DataSeries objects.

    It returns the number of times values1 crossed below values2 during the given period.

    :param values1: The DataSeries that crosses.
    :type values1: :class:`pyalgotrade.dataseries.DataSeries`.
    :param values2: The DataSeries being crossed.
    :type values2: :class:`pyalgotrade.dataseries.DataSeries`.
    :param start: The start of the range.
    :type start: int.
    :param end: The end of the range.
    :type end: int.

    .. note::
        The default start and end values check for cross below conditions over the last 2 values.
     N/A N/A _cross_impl values1 values2 start end N/A N/A N/A x N/A N/A x 0 N/A