class_docstr: This indicator gives a signal if the provided datas (2) cross up or down.
  
    - 1.0 if the 1st data crosses the 2nd data upwards
    - -1.0 if the 1st data crosses the 2nd data downwards
  
  It does need to look into the current time index (0) and the previous time
  index (-1) of both the 1t and 2nd data
  
  Formula:
    - diff = data - data1
    - upcross =  last_non_zero_diff < 0 and data0(0) > data1(0)
    - downcross = last_non_zero_diff > 0 and data0(0) < data1(0)
    - crossover = upcross - downcross
class_docstr_tok: ["This","indicator","gives","a","signal","if","the","provided","datas","(","2",")","cross","up","or","down",".","-","1.0","if","the","1st","data","crosses","the","2nd","data","upwards","-","-1.0","if","the","1st","data","crosses","the","2nd","data","downwards","It","does","need","to","look","into","the","current","time","index","(","0",")","and","the","previous","time","index","(","-1",")","of","both","the","1t","and","2nd","data","Formula",":","-","diff","=","data","-","data1","-","upcross","=","last_non_zero_diff","<","0","and","data0","(","0",")",">","data1","(","0",")","-","downcross","=","last_non_zero_diff",">","0","and","data0","(","0",")","<","data1","(","0",")","-","crossover","=","upcross","-","downcross"]
code: def __init__(self):
      upcross = CrossUp(self.data, self.data1)
      downcross = CrossDown(self.data, self.data1)
  
      self.lines.crossover = upcross - downcross
  
file_path: backtrader/backtrader/indicators/crossover.py
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  from .None import Indicator, And
label_desc: Use image node_id 1 to create a new CrossOver object from inherited base classes: Indicator with example: obj = CrossOver()