last refactors ...

This commit is contained in:
2024-05-18 13:21:23 +03:30
parent 8c81f649dc
commit fb4445c1d7
19 changed files with 8425 additions and 42 deletions
+29 -16
View File
@@ -18,7 +18,7 @@
#property link "https://www.saherelm.ir"
#property version "1.00"
#property strict
\
//
// Imports ...
#include "../Classes/x-saherelm.xmd5.class.mq5"
@@ -399,12 +399,6 @@ struct XOHCL
//
double result = 0;
//
if (mPType == NULL)
{
mPType = X_PRICE_CLOSE;
}
//
if (!IsValid())
{
@@ -438,7 +432,8 @@ struct XOHCL
//
// Retrieve Price base On Series Mode ...
double GetPrice(ENUM_SERIESMODE mMode) {
double GetPrice(ENUM_SERIESMODE mMode)
{
//
ENUM_X_PRICE mXMode = ToPrice(mMode);
@@ -1029,9 +1024,6 @@ struct XOHCL
return result;
}
//
ENUM_X_PRICE pMode = ToPrice(mode);
//
XOHCL iH;
result = iH.Init(
@@ -1046,7 +1038,7 @@ struct XOHCL
}
//
result = iH.GetPrice(pMode);
result = iH.GetPrice(mode);
//
return result;
@@ -1111,9 +1103,6 @@ struct XOHCL
return result;
}
//
ENUM_X_PRICE pMode = ToPrice(mode);
//
XOHCL iL;
result = iL.Init(
@@ -1128,7 +1117,7 @@ struct XOHCL
}
//
result = iL.GetPrice(pMode);
result = iL.GetPrice(mode);
//
return result;
@@ -1890,6 +1879,30 @@ struct XMarketCycle
return result;
}
//
bool Init(
string mSymbol, // Trading Symbol
ENUM_TIMEFRAMES mHostPeriod, // Host Period
ENUM_X_MARKET_CYCLES mCycle, // Init Cycle
ENUM_X_PERIOD_METHOD mMethod, // Period Selection Method
ENUM_TIMEFRAMES mPeriod, // Provided Period
string mPrefix = "" // Prefix
)
{
//
this.period = mPeriod;
this.method = mMethod;
//
return Init(
mSymbol,
mHostPeriod,
mCycle,
mPrefix
//
);
}
//
// Tools ...
+1 -2
View File
@@ -22,8 +22,7 @@
//
// Imports ...
#include <Trade/Trade.mqh>
#include "../Libraries/x-saherelm.common.lib.mq5"
#include "../Classes/x-saherelm.xdata-collector.mq5"
#include "../Classes/x-saherelm.xdata-collector.class.mq5"
//
// Definitions ...