def create_ohlc(open, high, low, close, dates=None, direction='both', **kwargs):
 if (dates is not None):
  utils.validate_equal_length(open, high, low, close, dates)
 else:
  utils.validate_equal_length(open, high, low, close)
 validate_ohlc(open, high, low, close, direction, **kwargs)
 if (direction is 'increasing'):
  ohlc_incr = make_increasing_ohlc(open, high, low, close, dates, **kwargs)
  data = [ohlc_incr]
 elif (direction is 'decreasing'):
  ohlc_decr = make_decreasing_ohlc(open, high, low, close, dates, **kwargs)
  data = [ohlc_decr]
 else:
  ohlc_incr = make_increasing_ohlc(open, high, low, close, dates, **kwargs)
  ohlc_decr = make_decreasing_ohlc(open, high, low, close, dates, **kwargs)
  data = [ohlc_incr, ohlc_decr]
 layout = graph_objs.Layout(xaxis=dict(zeroline=False), hovermode='closest')
 return graph_objs.Figure(data=data, layout=layout)

def create_ohlc ( open , high , low , close , dates = None , direction = 'both' , ** kwargs ) : if ( dates is not None ) : utils . validate_equal_length ( open , high , low , close , dates ) else : utils . validate_equal_length ( open , high , low , close ) validate_ohlc ( open , high , low , close , direction , ** kwargs ) if ( direction is 'increasing' ) : ohlc_incr = make_increasing_ohlc ( open , high , low , close , dates , ** kwargs ) data = [ ohlc_incr ] elif ( direction is 'decreasing' ) : ohlc_decr = make_decreasing_ohlc ( open , high , low , close , dates , ** kwargs ) data = [ ohlc_decr ] else : ohlc_incr = make_increasing_ohlc ( open , high , low , close , dates , ** kwargs ) ohlc_decr = make_decreasing_ohlc ( open , high , low , close , dates , ** kwargs ) data = [ ohlc_incr , ohlc_decr ] layout = graph_objs . Layout ( xaxis = dict ( zeroline = False ) , hovermode = 'closest' ) return graph_objs . Figure ( data = data , layout = layout )
beta function that creates an ohlc chart .