refactor some typos on helper classes and implement base classes for providers and start x5 provider ...

This commit is contained in:
2024-05-19 01:55:13 +03:30
parent 2777f56d78
commit 9c6cd61f2b
29 changed files with 5672 additions and 235 deletions
+79
View File
@@ -2233,6 +2233,48 @@ struct XMarketCycle
return result;
}
//
// Find Chart ID ...
ulong GetChartID()
{
//
ulong result = 0;
//
long firstChart = ChartFirst();
result = firstChart;
//
while (result >= 0)
{
//
string chSymbol = ChartSymbol(result);
ENUM_TIMEFRAMES chPeriod = ChartPeriod(result);
//
bool isOwnChart =
//
symbol == chSymbol &&
period == chPeriod
//
;
if (isOwnChart)
{
break;
}
//
result = ChartNext(result);
if (result < 0)
{
break;
}
}
//
return result;
}
//
// Create and String Representation for Unique Taging ...
string ToString()
@@ -2470,6 +2512,43 @@ bool IsRunningOnTestMode()
return result;
}
//
// Find Chart ID ...
ulong FindChartID(
string mSymbol = NULL, // Trading Symbol
ENUM_TIMEFRAMES mPeriod = NULL // Trading Period
)
{
//
ulong result = ChartFirst();
//
while (result >= 0)
{
//
string chSymbol = ChartSymbol(result);
ENUM_TIMEFRAMES chPeriod = ChartPeriod(result);
//
bool isOwn =
//
chSymbol == mSymbol &&
chPeriod == mPeriod
//
;
if (isOwn)
{
break;
}
//
result = ChartNext(result);
}
//
return result;
}
//
// Normalizers ...
File diff suppressed because it is too large Load Diff