//REQUIREMENTS extern MqlRates rates[]; //extern CQueue swingCollection; #include input group "swing configurations" input bool inpSwingModeClosure = false; class CSwings { protected: double mLatestSwing; bool swingModeClosure; enum swingCollection{SWINGHIGH=-1,SWINGNONE=0,SWINGLOW=1}; //swing DSA public: void CSwings(); void update(void); //fill in the DSA //run this inside main.mq5 Ontick() bool getSwingCollection(); bool isSwing(); }; void CSwings::CSwings(void){ //swingsCollection.Count(); CSwings::swingModeClosure=inpSwingModeClosure; } void CSwings::update(void){ if(rates[2].high>rates[1].high &&rates[2].high>rates[3].high) { //swing high is found } }