Risk Management in MQL5

Hi All,
i have been working on MQL5 for quite a while, and found that people online talk about robust system “a framework” for the algorithm to work inside, the framework will take care for the risk management for the algorithm so the algorithm only focus on the entry, exist and the framework focus on the Trading System.
still the idea makes me confused, in this link [1] the guy creates an MQL5 code that use random entry and it succeeded with him, my opinion, it only succeeded because of his money management framework, as you can see, the functions as he use like the below list, my main point, what do you think those functions would be doing, and what kind of concepts that help making a better trading framework
all i think of is the framework calculate the lot size based on the risk percentage per trade

List of functions
bool GetNewChartCandle()
int GetNumberOfPositionsThisSymbol()
double GetCurrencyPairProfit()
void OpenStopLossBuyTrade(int StopLossPoints)
void OpenStopLossSellTrade(int StopLossPoints)
double SetEquityStop()
int SetMaxPositionsThisSymbol()
double SetPositionsSize()
void CheckForTick(string Signal, int TradingRisk)

[1] https:// www. MQL5 TUTORIAL - ADVANCED RANDOM ENTRY SIGNAL