ictCore/Experts/core/swings.mqh
2026-05-03 01:00:28 +03:00

48 Zeilen
Kein EOL
831 B
MQL5

//REQUIREMENTS
extern MqlRates rates[];
//extern CQueue<int> swingCollection;
#include <Generic/Queue.mqh>
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
}
}