Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
Add all needed options for running trust_distrust strategy on genetic…
Browse files Browse the repository at this point in the history
…_algo (#683)
  • Loading branch information
emabo authored and DeviaVir committed Nov 6, 2017
1 parent 340dc7e commit 5af3d58
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ models/*.json
models/*.html
*.pyc
*.swp
temp.html
logs
14 changes: 10 additions & 4 deletions scripts/genetic_algo/evaluation.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,23 +88,29 @@ def convert(self, param, value):
if param == 'period':
res = minutes(int(value/2))
elif param == 'min_periods':
res = int(value * 20)
res = int(value*20)
elif param == 'trend_ema':
res = int(value*15 )
res = int(value*15)
elif 'period' in param:
res = int(value *10)
res = int(value*10)
elif 'pct' in param:
res = pct(value)
elif 'rate' in param:
res = pct(value)
elif 'rsi' in param:
res = float(value)
elif 'sell' in param:
res = value/10.0
elif 'buy' in param:
res = value/10.0
elif 'threshold' in param:
res = value/100000.0
elif 'sar_af' == param:
res = value / 1000.0
res = value/1000.0
elif 'sar_max_af' == param:
res = pct(value)
elif 'greed' == param:
res = value/10.0
else:
raise ValueError(colored(f"I don't understand {param} please add it to evaluation.py", 'red'))
return param, res
Expand Down

0 comments on commit 5af3d58

Please sign in to comment.