diff --git a/Libraries/x-saherelm.common.lib.mq5 b/Libraries/x-saherelm.common.lib.mq5 index 8ef8b9ba..0b168b38 100644 --- a/Libraries/x-saherelm.common.lib.mq5 +++ b/Libraries/x-saherelm.common.lib.mq5 @@ -5529,6 +5529,24 @@ struct XSymbolParser return result; } + // + bool IsDowJones(string symbol) + { + // + string symbolIdentifiers[] = { + "DowJoens30" // + }; + + // + bool result = Contains( + symbolIdentifiers, + symbol // + ); + + // + return result; + } + // // Symbol Finder ... string GetEURUSDSymbol() diff --git a/Parsers/x-saherelm.xch.dowj.long.parser.mq5 b/Parsers/x-saherelm.xch.dowj.long.parser.mq5 new file mode 100644 index 00000000..93acecf8 --- /dev/null +++ b/Parsers/x-saherelm.xch.dowj.long.parser.mq5 @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.strategy.mq5" + +// +// Conditions Parser ... +struct XCHStartegyDOWJONESLongConditionsParser +{ + // + string _version; + + // + bool IsFiltered( + XCHStrategyConditions &conditions // + ) + { + // + bool result = false; + + // + result = + // + false + // + ; + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Parsers/x-saherelm.xch.dowj.short.parser.mq5 b/Parsers/x-saherelm.xch.dowj.short.parser.mq5 new file mode 100644 index 00000000..f8394829 --- /dev/null +++ b/Parsers/x-saherelm.xch.dowj.short.parser.mq5 @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.strategy.mq5" + +// +// Conditions Parser ... +struct XCHStartegyDOWJONESShortConditionsParser +{ + // + string _version; + + // + bool IsFiltered( + XCHStrategyConditions &conditions // + ) + { + // + bool result = false; + + // + result = + // + false + // + ; + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Parsers/x-saherelm.xch.empty.long.parser.mq5 b/Parsers/x-saherelm.xch.empty.long.parser.mq5 new file mode 100644 index 00000000..160b36ff --- /dev/null +++ b/Parsers/x-saherelm.xch.empty.long.parser.mq5 @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.strategy.mq5" + +// +// Conditions Parser ... +struct XCHStartegyEMPTYLongConditionsParser +{ + // + string _version; + + // + bool IsFiltered( + XCHStrategyConditions &conditions // + ) + { + // + bool result = false; + + // + result = + // + false + // + ; + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Parsers/x-saherelm.xch.empty.short.parser.mq5 b/Parsers/x-saherelm.xch.empty.short.parser.mq5 new file mode 100644 index 00000000..e3550eba --- /dev/null +++ b/Parsers/x-saherelm.xch.empty.short.parser.mq5 @@ -0,0 +1,54 @@ +/////////////////////////////////////////////////////// +// +// SaherElm IT Center MQL5 Strategy Parser Library +// ------------------------------------------------ +// Name: XCHStartegyConditionsParser +// Description: provide all conditions parsing +// for XCH Strategy ... +// +// +// Maintainer: +// ------------ +// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) +// +////////////////////////////////////////////////////// +// +// Global Properties ... +#property library +#property copyright "Copyright 2023, SaherElm IT Center" +#property link "https://www.saherelm.ir" +#property version "1.00" +#property strict + +// +// Imports ... +#include "../Strategies/x-saherelm.xch.strategy.mq5" + +// +// Conditions Parser ... +struct XCHStartegyEMPTYShortConditionsParser +{ + // + string _version; + + // + bool IsFiltered( + XCHStrategyConditions &conditions // + ) + { + // + bool result = false; + + // + result = + // + false + // + ; + + // + return result; + } +}; + +// \ No newline at end of file diff --git a/Parsers/x-saherelm.xch.parser.mq5 b/Parsers/x-saherelm.xch.parser.mq5 index 4e880826..57f41ab8 100644 --- a/Parsers/x-saherelm.xch.parser.mq5 +++ b/Parsers/x-saherelm.xch.parser.mq5 @@ -25,6 +25,8 @@ #include "../Strategies/x-saherelm.xch.strategy.mq5" // +#include "../Parsers/x-saherelm.xch.dowj.long.parser.mq5" +#include "../Parsers/x-saherelm.xch.dowj.short.parser.mq5" #include "../Parsers/x-saherelm.xch.eurusd.long.parser.mq5" #include "../Parsers/x-saherelm.xch.eurusd.short.parser.mq5" #include "../Parsers/x-saherelm.xch.usdjpy.long.parser.mq5" @@ -69,6 +71,10 @@ struct XCHStartegyConditionsParser XCHStartegyXAUUSDLongConditionsParser _xauusdLongParser; XCHStartegyXAUUSDShortConditionsParser _xauusdShortParser; + // + XCHStartegyDOWJONESLongConditionsParser _dowjonesLongParser; + XCHStartegyDOWJONESShortConditionsParser _dowjonesShortParser; + // string GenerateSignalConditions(XCHStrategyConditions &conditions) { @@ -828,6 +834,7 @@ struct XCHStartegyConditionsParser bool isXAUUSD = _symbolParser.IsXAUUSD(signal.symbol); bool isUSDJPY = _symbolParser.IsUSDJPY(signal.symbol); bool isUSDCHF = _symbolParser.IsUSDCHF(signal.symbol); + bool isDowJones = _symbolParser.IsDownJones(signal.symbol); // if (!force) @@ -863,6 +870,12 @@ struct XCHStartegyConditionsParser result = _xauusdLongParser.IsFiltered(conditions); } + else if (isDowJones) + { + // + result = + _dowjonesLongParser.IsFiltered(conditions); + } } else { @@ -887,6 +900,10 @@ struct XCHStartegyConditionsParser // _xauusdLongParser.IsFiltered(conditions) // + || + // + _dowjonesLongParser.IsFiltered(conditions) + // ; } @@ -911,6 +928,7 @@ struct XCHStartegyConditionsParser bool isXAUUSD = _symbolParser.IsXAUUSD(signal.symbol); bool isUSDJPY = _symbolParser.IsUSDJPY(signal.symbol); bool isUSDCHF = _symbolParser.IsUSDCHF(signal.symbol); + bool isDowJones = _symbolParser.IsDownJones(signal.symbol); // if (!force) @@ -946,6 +964,12 @@ struct XCHStartegyConditionsParser result = _xauusdShortParser.IsFiltered(conditions); } + else if (isDowJones) + { + // + result = + _dowjonesShortParser.IsFiltered(conditions); + } } else { @@ -970,6 +994,10 @@ struct XCHStartegyConditionsParser // _xauusdShortParser.IsFiltered(conditions) // + || + // + _dowjonesShortParser.IsFiltered(conditions) + // ; }