Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 11, 2025

Summary

  • Removed the LoadOperationsFrom setting from configuration files (appsettings.TMON.json and appsettings.TRUR.json)
  • Implemented automatic calculation of the operations loading start date
  • The system now automatically uses the maximum of either the account open date or 30 days ago as the starting point

Problem Solved

The manual LoadOperationsFrom setting was prone to becoming stale and causing errors when not updated regularly. This change eliminates the need for manual maintenance of this setting.

Implementation Details

  • Made LoadOperationsFrom property nullable in TradingSettings class
  • Added automatic calculation logic in the TradingService constructor
  • The calculation uses Max(accountOpenDate, thirtyDaysAgo) to determine the optimal starting point
  • Added informative logging to show whether the value came from configuration or was calculated automatically
  • Updated documentation in README.md to remove the obsolete setting

Test plan

  • Code compiles successfully with no new errors
  • Build passes without issues
  • Automatic calculation logic handles both nullable and configured scenarios
  • Logging provides clear information about the calculated value
  • Documentation updated to reflect the changes

🤖 Generated with Claude Code


Resolves #245

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #245
@konard konard self-assigned this Sep 11, 2025
konard and others added 2 commits September 11, 2025 10:14
…ulation

The LoadOperationsFrom setting has been removed from configuration files
and is now calculated automatically. The system uses the maximum of either
the account open date or 30 days ago as the starting point for loading
operations, preventing the need for manual updates that could cause errors.

Changes:
- Made LoadOperationsFrom nullable in TradingSettings
- Removed LoadOperationsFrom from both appsettings files
- Implemented automatic calculation logic in TradingService constructor
- Updated README.md to remove documentation for the removed setting
- Added informative logging for both configured and calculated values

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@konard konard changed the title [WIP] TraderBot: Remove LoadOperationsFrom from config TraderBot: Remove LoadOperationsFrom from config and implement automatic calculation Sep 11, 2025
@konard konard marked this pull request as ready for review September 11, 2025 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TraderBot: Remove LoadOperationsFrom from config

2 participants