楼主: 
bxc (中年鲁蛇联盟)   
2021-10-11 12:14:45取得日线和4H历史资料
2个不同shape的Series怎么做操作
print(ohlcv_D.close.shape)  #(1517,)
print(ohlcv.close.shape)      #(36257,)
想把他加到
entries = crossover(macdhist, 0) &
(ohlcv_D.close.shift(1)>ohlcv_D.close.shift(2))
会出现ValueError: shape mismatch: objects cannot be broadcast to a single
shape
ohlcv_D
timestamp
2017-08-17 00:00:00+00:00     4285.08
2017-08-18 00:00:00+00:00     4108.37
2017-08-19 00:00:00+00:00     4139.98
2017-08-20 00:00:00+00:00     4086.29
2017-08-21 00:00:00+00:00     4016.00
ohlcv(4H)
timestamp
2017-08-17 04:00:00+00:00     4308.83
2017-08-17 05:00:00+00:00     4315.32
2017-08-17 06:00:00+00:00     4324.35
2017-08-17 07:00:00+00:00     4349.99
2017-08-17 08:00:00+00:00     4360.69