def next(self):
    position = self.getposition()
    rsi = self.rsi[0]
    if ((not position) and (rsi >= 60)):
        self.order_target_percent(target=self.p.ratio)
    if (position and (rsi <= 30)):
        self.close()
def next(self):
    position = self.getposition()
    rsi = self.rsi[0]
    if ((not position) and (rsi >= 60)):
        self.order_target_percent(target=self.p.ratio)
    if (position and (rsi <= 30)):
        self.close()