#NEWLINE# def calculate_signals( self , event ) : #NEWLINE# #INDENT# ticker = self . tickers [ 0 ] #NEWLINE# if ( ( event . type == 'TICK' ) and ( event . ticker == ticker ) ) : #NEWLINE# #INDENT# if ( ( not self . invested ) and ( self . ticks == 0 ) ) : #NEWLINE# #INDENT# signal = SignalEvent ( ticker , 'BOT' ) #NEWLINE# self . events_queue . put ( signal ) #NEWLINE# self . invested = True #NEWLINE# #UNINDENT# self . ticks += 1