Neural Networks, Deep Learning, Data Science, Algorithmic Trading, Cryptocurrency Investment.
MyCandlesStrat_0(Strategy): def init(self): super().init() self.signal1_1 = self.I(SIGNAL_0, self.data) def next(self): super().next() if self.signal1_1 == 1: sl_pct = 0.1 # 10% stop-loss tp_pct = 0.025 # 2.5% take-profit sl_price = self.data.Close[-1] * (1 - sl_pct) tp_price = self.data.Close[-1]