Testing the same algo in live and backtest mode. Most of it works well. We need a commission model for the TradingPair currency type.

This commit is contained in:
fredfortier
2017-09-20 23:48:57 -04:00
parent 4e2d092123
commit 10a5b5412e
4 changed files with 256 additions and 70 deletions
+10 -10
View File
@@ -63,6 +63,16 @@ class ExchangeTradingAlgorithmBase(TradingAlgorithm):
super(ExchangeTradingAlgorithmBase, self).__init__(*args, **kwargs)
def round_order(self, amount):
"""
We need fractions with cryptocurrencies
:param amount:
:return:
"""
# TODO: is this good enough? Victor has a better solution.
return amount
@api_method
@preprocess(symbol_str=ensure_upper_case)
def symbol(self, symbol_str, exchange_name=None):
@@ -595,16 +605,6 @@ class ExchangeTradingAlgorithmLive(ExchangeTradingAlgorithmBase):
amount, asset.symbol, asset.exchange))
return None
def round_order(self, amount):
"""
We need fractions with cryptocurrencies
:param amount:
:return:
"""
# TODO: is this good enough? Victor has a better solution.
return amount
@api_method
def batch_market_order(self, share_counts):
raise NotImplementedError()