//+------------------------------------------------------------------+ //| HighFractalContainer.mqh | //| Copyright 2023, MetaQuotes Ltd. | //| https://www.mql5.com | //+------------------------------------------------------------------+ #property copyright "Copyright 2023, MetaQuotes Ltd." #property link "https://www.mql5.com" #property version "1.00" #include "HighFractal.mqh" #include #define SIZE 700 double input arrowDistanceHighs ; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ class HighFractalContainer { private: HighFractal* highFractals[SIZE]; int freeIndex ; double range ; ENUM_TIMEFRAMES timeFrame ; public: HighFractalContainer(ENUM_TIMEFRAMES _timeFrame); ~HighFractalContainer(); //GETTERS HighFractal* getHighFractal(int _index) {return highFractals[_index] ;} // returns the fractal using its index in the array int getFreeIndex() {return freeIndex ; } //SETTERS void setRange(double _range) {range = _range ;} // OTHER FUNCTIONS void addHighFractal(HighFractal* _highFractal); // adds high fractal to the high fractals array void printHighFractals(); // prints the data of every high fractal in the highFractals[] array }; //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ HighFractalContainer::HighFractalContainer(ENUM_TIMEFRAMES _timeFrame) { timeFrame = _timeFrame; freeIndex = 0 ; } //+------------------------------------------------------------------+ //| | //+------------------------------------------------------------------+ HighFractalContainer::~HighFractalContainer() { for(int i=0; i 0) { for(int i=0 ; i