#!/usr/bin/python

import sys, time
from btcexchange import *
from PyQt4 import QtGui, QtCore

class SimpleTicker(QtGui.QWidget):
    def __init__(self, exchanges):
        super(SimpleTicker, self).__init__()
	self.exchanges = exchanges
	self.Label = []
	self.Value = []
	self.OValue = []
	self.ex = BTCExchange()
	self.initUI()
	
    def initUI(self):
	i=0
	spacing = 25
        self.center()
        self.setWindowTitle('Simple Ticker')
	font = QtGui.QFont()
	font.setPointSize(20)

	for exchange in self.exchanges:
	    self.Label.append(QtGui.QLabel("%s (%s):" % (exchange[0], exchange[1]), self))
	    self.Value.append(QtGui.QLabel("0", self))
	    self.OValue.append(0)
	    self.Label[i].move (15, 5+(i*spacing))
	    self.Value[i].move (250,5+(i*spacing))
	    self.Label[i].setFont(font)
	    self.Value[i].setFont(font)
	    self.Value[i].setFixedWidth(200)
	    i += 1

        self.resize(400, 22+(i*22))
	self.show()

	self.updateTickers()

    def updateTickers(self):
	i=0
	RED = QtGui.QPalette()
	RED.setColor(QtGui.QPalette.Foreground,QtCore.Qt.red)
	GREEN = QtGui.QPalette()
	GREEN.setColor(QtGui.QPalette.Foreground,QtCore.Qt.green)

	print "TICK"
	for exchange in self.exchanges:
	    Value = self.ex.Ticker(exchange[0], exchange[1])
	    LValue = float(Value["Last"])
	    print "%s-%s: %.2f" % (exchange[0], exchange[1], LValue)
	    if LValue < self.OValue[i]:
		self.Value[i].setPalette(RED)
	    elif LValue > self.OValue[i]:
		self.Value[i].setPalette(GREEN)
	    self.Value[i].setText("%.2f" % LValue)
	    self.OValue[i] = LValue
	    i += 1
	QtCore.QTimer.singleShot(5000,self.updateTickers)

    def center(self):
        qr = self.frameGeometry()
        cp = QtGui.QDesktopWidget().availableGeometry().center()
        qr.moveCenter(cp)
        self.move(qr.topLeft())

    def closeEvent(self, event):
        reply = QtGui.QMessageBox.question(self, 'Message',
            "Are you sure to quit?", QtGui.QMessageBox.Yes | 
            QtGui.QMessageBox.No, QtGui.QMessageBox.No)

        if reply == QtGui.QMessageBox.Yes:
            event.accept()
        else:
            event.ignore()  

def main(exchanges):
    app = QtGui.QApplication(sys.argv)
    ex = SimpleTicker(exchanges)
    sys.exit(app.exec_())


if __name__ == '__main__':
    exchanges = [["GOX", "BTCUSD"],["BFX", "BTCUSD"],["BFX", "LTCUSD"]]
    main(exchanges)

@@ -151,27 +151,40 @@
 f, exchanges
+, updatespeed
 ):%0A
-
         supe
@@ -244,16 +244,48 @@
 changes%0A
+%09self.updatespeed = updatespeed%0A
 %09self.La
@@ -1185,17 +1185,21 @@
 Core.Qt.
-g
+darkG
 reen)%0A%0A%09
@@ -1640,17 +1640,34 @@
 gleShot(
-5
+self.updatespeed*1
 000,self
@@ -2207,16 +2207,29 @@
 xchanges
+, updatespeed
 ):%0A    a
@@ -2293,16 +2293,28 @@
 xchanges
+,updatespeed
 )%0A    sy
@@ -2434,16 +2434,16 @@
 CUSD%22%5D%5D%0A
-
     main
@@ -2452,10 +2452,14 @@
 xchanges
+, 60
 )%0A

Change green to darkGreen