Skip to content
All library documents

MacroHFT Risk Management with Account Memory and Trade Sizing

Article MQL5 articles

Summary

This article extends a context-aware reinforcement learning framework for cryptocurrency trading with a risk management module. In the described two-stage setup, market conditions are classified by trend and volatility so specialized sub-agents can learn for different scenarios; a memory-equipped hyper-agent then coordinates their outputs. The added module considers both the agents’ proposed actions and account-state information, aiming to adapt trade volume alongside stop-loss and take-profit parameters.

The account and action streams are projected and passed through memory components so the model can incorporate historical changes in financial results. The proposed sizing logic uses forecast confidence and observed trading outcomes to inform how much risk to take, becoming more conservative when losses increase. The article reports training on historical data and evaluation on data outside the training set, with a high share of profitable trades in that test sample. It also acknowledges that the number of trades was too low to represent typical high-frequency activity, and suggests that indicators or limited training data may explain this. The reported evidence does not establish robustness across markets or periods.

Key ideas

  • The framework classifies market conditions before training specialized trading agents.
  • A memory-equipped hyper-agent coordinates the specialized agents using historical context.
  • The risk module combines agent actions with account-state information to inform trade sizing.
  • The proposed approach adjusts risk in response to confidence and patterns in account performance.
  • The reported test had a high proportion of profitable trades but too few trades to represent typical high-frequency activity.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.