update docs, fix bug in environment

This commit is contained in:
robcaulk
2022-11-13 16:56:31 +01:00
parent 3c249ba994
commit 388ca21200
4 changed files with 33 additions and 6 deletions

View File

@@ -578,6 +578,25 @@ CONF_SCHEMA = {
"model_training_parameters": {
"type": "object"
},
"rl_config": {
"type": "object",
"properties": {
"train_cycles": {"type": "integer"},
"max_trade_duration_candles": {"type": "integer"},
"add_state_info": {"type": "boolean", "default": False},
"max_training_drawdown_pct": {"type": "number", "default": 0.02},
"cpu_count": {"type": "integer", "default": 1},
"model_type": {"type": "string", "default": "PPO"},
"policy_type": {"type": "string", "default": "MlpPolicy"},
"model_reward_parameters": {
"type": "object",
"properties": {
"rr": {"type": "number", "default": 1},
"profit_aim": {"type": "number", "default": 0.025}
}
}
},
},
},
"required": [
"enabled",

View File

@@ -59,7 +59,7 @@ class BaseEnvironment(gym.Env):
if self.config.get('fee', None) is not None:
self.fee = self.config['fee']
elif dp is not None:
self.fee = self.dp.exchange.get_fee(symbol=dp.current_whitelist()[0])
self.fee = dp._exchange.get_fee(symbol=dp.current_whitelist()[0]) # type: ignore
else:
self.fee = 0.0015