Hi @amusleh-spotware-com ,
I noticed a redundancy in Symbol and Period declarations that can lead to user error.
My Findings:
- Declaration: Values can be set via Environment Variables OR .cbotset files, which is okay.
- Double Declaration: The current image allows conflicting configurations to exist simultaneously within .cbotset and as Environment Variables.
- Hierarchy: In case of double declaration, .cbotset takes precedence without warning.
My Suggestion:
- Atomic Configuration: The .cbotset file should always contain both or none of these variables.
- Mutual Exclusivity: If .cbotset has values, declaring them as Environment Variables should not be allowed. The container should fail to start, throwing a configuration error.
- Fallback: If .cbotset is empty, both Environment Variables must be mandatory.
This would prevent users from accidentally running a bot on the wrong symbol/period due to a configuration override.
Am I missing a specific reason for the current logic, maybe?
Hi @amusleh-spotware-com ,
I noticed a redundancy in Symbol and Period declarations that can lead to user error.
My Findings:
My Suggestion:
This would prevent users from accidentally running a bot on the wrong symbol/period due to a configuration override.
Am I missing a specific reason for the current logic, maybe?