def put(): if bar is not None and bar != []: signal = SignalEvent(symbol, bar[0]['date'], bar[0]['close'], 'EXITALL', strength=1) events.put(signal)
def short(self, symbol, lots=1, percent=False): bar = self.bars.get_latest_bars(symbol, N=1) if bar != []: signal = SignalEvent(symbol, bar[0]['date'], bar[0]['close'], 'SHORT', lots, percent) events.put(signal)
def put(): if bar is not None and bar != []: signal = SignalEvent(symbol, bar[0]['date'], bar[0]['close'], 'SHORT', strength, percent) events.put(signal)