Blueshift backtesting erros

I had the errors below when i was practicing the basic tutorials (Visual programming) in provided on the blueshift website using the simple moving avearge crossovers.
After completing the setup blocks i continued to backtest when i had these erros.
Kindly help me fix this  so i  can continue with my practice.

I also want to know when the visual programming is able to handle more complex startegies like Bollinger bands etc and where do i
find additional materials and tutorials to learn those complex startegies. 
Are there people using blueshift for Live trading?


"line 54, in scheduled_func_299114
Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
Using TensorFlow backend.
Traceback (most recent call last):
  File "/zbin/conda-bin/zipline", line 11, in <module>
    sys.exit(main())
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/__main__.py", line 103, in _
    return f(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/click/decorators.py", line 17, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/__main__.py", line 291, in run
    pwd_path=pwd_path
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/run_algo.py", line 227, in _run
    overwrite_sim_params=False,
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 770, in run
    for perf in self.get_generator():
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/gens/tradesimulation.py", line 213, in transform
    for capital_change_packet in every_bar(dt):
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/gens/tradesimulation.py", line 137, in every_bar
    handle_data(algo, current_data, dt_to_use)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/events.py", line 216, in handle_data
    dt,
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/events.py", line 235, in handle_data
    self.callback(context, data)
  File "user_algo.py", line 54, in scheduled_func_299114
  File "user_algo.py", line 30, in rule_func_299126
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/blueshift_library/library/functions.py", line 282, in enter_short
    func(asset, -abs(value))
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/api_support.py", line 56, in wrapped
    return getattr(algo_instance, f.__name__)(*args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/api_support.py", line 125, in wrapped_method
    return method(self, *args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 2125, in order_target_percent
    style=style)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/utils/api_support.py", line 125, in wrapped_method
    return method(self, *args, **kwargs)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 1509, in order
    limit_price, stop_price, style)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 1521, in _calculate_order
    style)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/algorithm.py", line 1575, in validate_order_params
    self.trading_client.current_data)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/finance/controls.py", line 309, in validate
    self.handle_violation(asset, amount, algo_datetime)
  File "/home/zipline/anaconda2/lib/python2.7/site-packages/zipline/finance/controls.py", line 94, in handle_violation
    constraint=constraint)
zipline.errors.TradingControlViolation: Order for -149 shares of Equity(134 [KO]) at 2018-03-20 15:59:00+00:00 violates trading constraint
LongOnly({}).

"

To answer your other questions: visual programming is already able to handle strategies like bollinger band. There are quite a few examples in the template strategies (the options you get when you create a strategy) including bollinger band, RSI and pair trading. In fact you can even develop machine-learning based strategies using the no-code interface. However, I agree the help docs are not nearly enough. If you are looking for something specific, let us know. We will add more to the docs and tutorials. Also, yes, blueshift sees substantial amount of live trades going through the platform.



The error you get for your specific strategy can be traced to the last sentence - 

violates trading constraint
LongOnly({}).

If you are using the visual programming, check in the outermost block towards the top - if you have the "long only" check box selected. If you have, the strategy risk control will throw error when you are trying to short an asset. If you do no intend to have a long only strategy, un-check the option. Else make sure the strategy logic does not violate the constraints (do not short sell).

Hi  Prodipta ,

Thanks very much for the response and the information. Concerning the solutions to the errors, am not able to find the top section you are referring to. See bellow the link to the screenshot of my blocks and kibdly use images to explain . thanks.

John.

Please see the highleted part in this image. Also if you are using the visual coding inteface, try to click the arrow icon (">") near the  "Quick Run" tab header, and you will get to the expended view. In this view, on the left hand side you will see a help panel. This help panel gives detailed helps for a block that is currently selected.