Edge functionality drafted

This commit is contained in:
misagh 2018-08-24 11:59:10 +02:00
parent a37802e21c
commit bc6b80ff38
2 changed files with 19 additions and 0 deletions

6
freqtrade/edge.py Normal file
View File

@ -0,0 +1,6 @@
# EDGE
# WinRate and Expected Risk Reward should be calculated for all whitelisted pairs
# ASYNC: For each pair call backslap
# Save WR and ERR in Edge Dict
# Save last time updated for each pair in edge_last_update_time
# Calulate expectancy and position size and stop loss

View File

@ -342,6 +342,9 @@ class FreqtradeBot(object):
:return: True if a trade object has been created and persisted, False otherwise :return: True if a trade object has been created and persisted, False otherwise
""" """
interval = self.strategy.ticker_interval interval = self.strategy.ticker_interval
# EDGE
# STAKE AMOUNT SHOULD COME FROM EDGE
stake_amount = self._get_trade_stake_amount() stake_amount = self._get_trade_stake_amount()
if not stake_amount: if not stake_amount:
@ -362,6 +365,16 @@ class FreqtradeBot(object):
if not whitelist: if not whitelist:
raise DependencyException('No currency pairs in whitelist') raise DependencyException('No currency pairs in whitelist')
# EDGE
# WinRate and Expected Risk Reward should be calculated for all whitelisted pairs
# ASYNC: For each pair call backslap
# Save WR and ERR in Edge Dict
# Save last time updated for each pair in edge_last_update_time
# Calulate expectancy and position size and stop loss
# whitelist = Edge.filter(whitelist)
# Pick pair based on buy signals # Pick pair based on buy signals
for _pair in whitelist: for _pair in whitelist:
thistory = self.exchange.get_candle_history(_pair, interval) thistory = self.exchange.get_candle_history(_pair, interval)