multiple stocks order
Hi, I wanted to buy two stocks under dfferent condistions. The thing is data0 works , data1 doesn't , thanks for your time!!!
def next(self): for i, d in enumerate(self.datas): if i==0: if self.leida0.today > 0 and self.leida0.lastday<0: o1 = self.buy(data=d) if i==1: if self.leida1.today > 0 and self.leida1.lastday<0: o2 = self.buy(data=d)
stock1 has buy signal (the green triangle)
but stock 2 doesn't
OK I realized, actually the transaction of stock2 completed, Why is there no buy signal --- the green triangle ?
ab_trader last edited by
Try to use
BuySellobserver applied to several data feeds.
@ab_trader Thank you so much!