For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/
express 2 conditions in a efficient way
-
Say if I try to check, trix.trix cross trix.signal and trix.trix < 0, How to write it in an efficient way.
I know I can use CrossOver(trix.trix, trix.signal), but how to add another condition, trix < 0 -
Operator
and
cannot be overridden in Python, hence the need to have something specific.trix1 = bt.ind.CrossOver(trix.trix, trix.signal) trix2 = trix < 0 mytrixsignal = bt.And(trix1, trix2)
-
thanks! so fast! :-)
-
BTW, how to initialize a line with 0?
-
That question probably needs elaboration. It seems out of context ...
Lines are not initialized. They are filled with values during
next
(andprenext
before the warm-up period is over)