Exemple #1
0
def main(i, code):
    #code = "000592"
    dbfeed = Feed(code, bar.Frequency.DAY, 1024)
    dbfeed.loadBars()

    myStrategy = MyStrategy(dbfeed, code, bBandsPeriod=i)
    ms = eal()
    ms.protfolio(myStrategy)
Exemple #2
0
def main(i, code):
    #code = "000592"
    dbfeed = Feed(code, bar.Frequency.DAY, 1024)
    dbfeed.loadBars()

    myStrategy = pyAlgoBollinger(dbfeed, code, bBandsPeriod=i)
    ms = eal()
    ms.setDebug(True)
    ms.protfolio(myStrategy)
Exemple #3
0
def main(i, code):
    #code = "000592"
    dbfeed = Feed(code, bar.Frequency.DAY, 1024)
    dbfeed.loadBars()

    entrySMA = 200
    exitSMA = 5
    rsiPeriod = 2
    overBoughtThreshold = 90
    overSoldThreshold = 10

    myStrategy = pyAlgoRSI(dbfeed, code, entrySMA, exitSMA, rsiPeriod,
                           overBoughtThreshold, overSoldThreshold)
    ms = eal()
    ms.setDebug(True)
    ms.protfolio(myStrategy)