//+------------------------------------------------------------------+ //| Symbol_Strength_Calculator.mqh | //| VERSION 1.20: Added symbol existence check. | //| Copyright 2025, xxxxxxxx | //+------------------------------------------------------------------+ #property copyright "Copyright 2025, xxxxxxxx" //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class CSymbolStrengthCalculator { private: int m_period; ENUM_TIMEFRAMES m_timeframe; string m_symbols[]; int m_symbol_count; double GetROC(string symbol, int index); public: CSymbolStrengthCalculator(void) : m_symbol_count(0) {}; ~CSymbolStrengthCalculator(void) {}; bool Init(int period, ENUM_TIMEFRAMES tf, const string &symbols[]); void CalculateStep(int bar_index, double &strengths[]); int GetCount() { return m_symbol_count; } bool IsDataReady(void); }; //+------------------------------------------------------------------+ bool CSymbolStrengthCalculator::Init(int period, ENUM_TIMEFRAMES tf, const string &symbols[]) { m_period = period; m_timeframe = tf; m_symbol_count = ArraySize(symbols); ArrayResize(m_symbols, m_symbol_count); for(int i=0; i