31.07.2021 Views

Ultimate Algorithmic Trading System

Using automated systems for trading in stock markets

Using automated systems for trading in stock markets

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

marketDataClass

class marketDataClass(object):

def __init__(self):

self.symbol = ""

self.minMove = 0

self.bigPtVal = 0

self.seed = 0

self.date = list()

self.open = list()

self.high = list()

self.low = list()

self.close = list()

self.volume = list()

self.opInt = list()

self.dataPoints = 0

def setDataAttributes(self,symbol,bigPtVal,minMove):

self.symbol = symbol

self.minMove = minMove

self.bigPtVal = bigPtVal

def readData(self,date,open,high,low,close,volume,opInt):

self.date.append(date)

self.open.append(open)

self.high.append(high)

self.low.append(low)

self.close.append(close)

self.volume.append(volume)

self.opInt.append(opInt)

self.dataPoints += 1

tradeInfoClass

class tradeInfo(object):

def __init__(self,tradeOrder,tradeDate,tradeName,

tradePrice,quant,entryOrExit):

self.tradeOrder = tradeOrder

self.tradeDate = tradeDate

self.tradeName = tradeName

self.tradePrice = tradePrice

self.quant = quant

self.tradeProfit = 0

self.cumuProfit = 0

self.entryOrExit = entryOrExit

# print("populating info: ",self.tradeName,’ ’,

# self.tradePrice)

311

PYTHON SYSTEM BACKTESTER

www.rasabourse.com

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!