Пример #1
0
 def put():
     if bar is not None and bar != []:
         signal = SignalEvent(symbol,
                              bar[0]['date'],
                              bar[0]['close'],
                              'EXITALL',
                              strength=1)
         events.put(signal)
Пример #2
0
 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)
Пример #3
0
 def put():
     if bar is not None and bar != []:
         signal = SignalEvent(symbol, bar[0]['date'], bar[0]['close'],
                              'SHORT', strength, percent)
         events.put(signal)