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
andcannot 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
prenextbefore the warm-up period is over)