It seems the code below doesn't work
i = int(f)
In some cases I need to set different status in a line.
s1 = indicator > 0.2 s2 = indicator < -0.2 signal = s1 - s2
the value of signal will be
[1, nan, nan, -1, -1, nan, -1, 1, nan, nan...]
I would like to know how to avoid nan in this case?
Today I use the code below
signal = bt.Max(0, 0) singal = b - s
I wonder is there an efficient way to initialize signal with value 0?
Does backtrader support multi-process? I suppose this shall be supported. I see backtrader use multi-process when do optimizing, but I don't find how to use multi-process examples. I am asking for this because I want to scan on stocks. The strategy is same for all, but need different data feeds.