add some parser templates ...

This commit is contained in:
2024-08-07 16:22:10 +03:30
parent 5c5bf64118
commit 09e7f7b3dd
6 changed files with 262 additions and 0 deletions
+28
View File
@@ -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)
//
;
}