apply last POI Changes Refctor and Resolve all Side Affect Issues on X121 SMC Expert Projects ...
This commit is contained in:
@@ -1003,6 +1003,17 @@ double GetExit(
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve Current Tick ...
|
||||
*/
|
||||
bool GetTick(
|
||||
string mSymbol,
|
||||
MqlTick &tick //
|
||||
)
|
||||
{
|
||||
return SymbolInfoTick(mSymbol, tick);
|
||||
}
|
||||
|
||||
//
|
||||
// END Position ...
|
||||
//
|
||||
|
||||
@@ -22,3 +22,371 @@
|
||||
//
|
||||
#include "../Libraries/x-saherelm.common.extensions.lib.mq5"
|
||||
|
||||
//
|
||||
// Use To Parse Symbols for
|
||||
// Ignore Brokers Additional Suffixes ...
|
||||
struct XSymbolParser
|
||||
{
|
||||
//
|
||||
string version; // Temp ...
|
||||
|
||||
//
|
||||
// Symbol Parsing ...
|
||||
|
||||
//
|
||||
// Forext ...
|
||||
|
||||
//
|
||||
bool IsEURUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsUSDJPY(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"USD",
|
||||
"JPY" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURJPY(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"JPY" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsUSDCHF(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"USD",
|
||||
"CHF" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURCHF(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"CHF" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsGBPUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"GBP",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURGBP(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"GBP" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsAUDUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"AUD",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURAUD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"AUD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsUSDCAD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"USD",
|
||||
"CAD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURCAD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"CAD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsNZDUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"NZD",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsEURNZD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"EUR",
|
||||
"NZD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Metals ...
|
||||
|
||||
//
|
||||
bool IsXAUUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"XAU",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsXAGUSD(string symbol)
|
||||
{
|
||||
//
|
||||
string symbolIdentifiers[] = {
|
||||
"XAG",
|
||||
"USD" //
|
||||
};
|
||||
|
||||
//
|
||||
bool result = Contains(
|
||||
symbolIdentifiers,
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Indexes ...
|
||||
|
||||
//
|
||||
bool IsDowJones(string symbol)
|
||||
{
|
||||
//
|
||||
bool result = Contains(
|
||||
"DowJones30",
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Oil ...
|
||||
|
||||
//
|
||||
bool IsBrent(string symbol)
|
||||
{
|
||||
//
|
||||
bool result = Contains(
|
||||
"BRENT",
|
||||
symbol //
|
||||
);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Symbol Finder ...
|
||||
string GetEURUSDSymbol()
|
||||
{
|
||||
//
|
||||
string result = NULL;
|
||||
|
||||
//
|
||||
string symbols[];
|
||||
int symbolsCount = GetAllSymbols(
|
||||
symbols //
|
||||
);
|
||||
if (!IsValidSize(symbolsCount))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < symbolsCount; i++)
|
||||
{
|
||||
//
|
||||
string iSymbol = symbols[i];
|
||||
if (IsEURUSD(iSymbol))
|
||||
{
|
||||
//
|
||||
result = iSymbol;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user