Esempio n. 1
0
    def __init__(self, status):
        SMA.__init__(self, status)
        OLS.__init__(self, status)
        PIP.__init__(self, status)

        self.mean_for_ols_period = 25
        self.ols_period = 25
Esempio n. 2
0
    def __init__(self, status):
        SMA.__init__(self, status)
        OLS.__init__(self, status)
        PIP.__init__(self, status)

        self.mean_for_ols_period = 25
        self.ols_period = 25
    def test_sma5(self):
        self.event_src.file_path = \
        "../data/EURUSD_Candlestick_15_s_BID_16.07.2015-16.07.2015.csv"
        self.event_src.stream_to_queue()

        strategy = SMA(self.status)
        strategy.mean_period_short = 30
        strategy.mean_period_long = 60
        self.manager.strategy = strategy
        self.simulate()

        self.assertResult(67, 11.4, 1.13029)
    def test_sma3(self):
        self.event_src.file_path = \
        "../data/EURUSD_Candlestick_15_s_BID_16.07.2015-16.07.2015.csv"
        self.event_src.stream_to_queue()

        strategy = SMA(self.status)
        strategy.mean_period_short = 20
        strategy.mean_period_long = 80
        self.manager.strategy = strategy
        self.simulate()

        self.assertResult(59, -14.2, 0.85899)
Esempio n. 5
0
    def test_sma5(self):
        self.event_src.file_path = \
        "../data/EURUSD_Candlestick_15_s_BID_16.07.2015-16.07.2015.csv"
        self.event_src.stream_to_queue()

        strategy = SMA(self.status)
        strategy.mean_period_short = 30
        strategy.mean_period_long = 60
        self.manager.strategy = strategy
        self.simulate()

        self.assertResult(67, 11.4, 1.13029)
Esempio n. 6
0
    def test_sma3(self):
        self.event_src.file_path = \
        "../data/EURUSD_Candlestick_15_s_BID_16.07.2015-16.07.2015.csv"
        self.event_src.stream_to_queue()

        strategy = SMA(self.status)
        strategy.mean_period_short = 20
        strategy.mean_period_long = 80
        self.manager.strategy = strategy
        self.simulate()

        self.assertResult(59, -14.2, 0.85899)
Esempio n. 7
0
File: main.py Progetto: vynaloze/15
def strategies() -> Dict[str, SearchStrategy]:
    return {
        "bfs": BFS(),
        "dfs": DFS(),
        "idfs": IDFS(),
        "bf": BestFirst(),
        "astar": AStar(),
        "sma": SMA(),
    }
Esempio n. 8
0
 def __init__(self, status):
     SMA.__init__(self, status)
     KNN.__init__(self, status)
Esempio n. 9
0
 def __init__(self, status):
     SMA.__init__(self, status)
     PIP.__init__(self, status)
     BOL.__init__(self, status)        
Esempio n. 10
0
 def __init__(self, status):
     SMA.__init__(self, status)
     KNN.__init__(self, status)
Esempio n. 11
0
 def __init__(self, status):
     SMA.__init__(self, status)
     PIP.__init__(self, status)
     Time.__init__(self, status)
     RSI.__init__(self, status)
Esempio n. 12
0
    def __init__(self, status):
        SMA.__init__(self, status)
        RSI.__init__(self, status)

        self.rsi_period = 75