add support for empty signal filtering for AUDUSD,NZDUSD,USDCAD ...

This commit is contained in:
2024-08-09 19:22:29 +03:30
parent 2c6ef04c8e
commit d21ed8fc08
7 changed files with 424 additions and 4 deletions
@@ -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 XCHStartegyAUDUSDLongConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//
@@ -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 XCHStartegyAUDUSDShortConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//
@@ -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 XCHStartegyNZDUSDLongConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//
@@ -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 XCHStartegyNZDUSDShortConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//
+100 -4
View File
@@ -27,6 +27,12 @@
//
#include "../Parsers/x-saherelm.xch.dowj.long.parser.mq5"
#include "../Parsers/x-saherelm.xch.dowj.short.parser.mq5"
#include "../Parsers/x-saherelm.xch.audusd.long.parser.mq5"
#include "../Parsers/x-saherelm.xch.audusd.short.parser.mq5"
#include "../Parsers/x-saherelm.xch.nzdusd.long.parser.mq5"
#include "../Parsers/x-saherelm.xch.nzdusd.short.parser.mq5"
#include "../Parsers/x-saherelm.xch.usdcad.long.parser.mq5"
#include "../Parsers/x-saherelm.xch.usdcad.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"
@@ -52,29 +58,50 @@ struct XCHStartegyConditionsParser
XSymbolParser _symbolParser;
//
// EURUSD ...
XCHStartegyEURUSDLongConditionsParser _eurusdLongParser;
XCHStartegyEURUSDShortConditionsParser _eurusdShortParser;
//
// GBPUSD ...
XCHStartegyGBPUSDLongConditionsParser _gbpusdLongParser;
XCHStartegyGBPUSDShortConditionsParser _gbpusdShortParser;
//
// USDJPY ...
XCHStartegyUSDJPYLongConditionsParser _usdjpyLongParser;
XCHStartegyUSDJPYShortConditionsParser _usdjpyShortParser;
//
// USDCHF ...
XCHStartegyUSDCHFLongConditionsParser _usdchfLongParser;
XCHStartegyUSDCHFShortConditionsParser _usdchfShortParser;
//
// XAUUSD ...
XCHStartegyXAUUSDLongConditionsParser _xauusdLongParser;
XCHStartegyXAUUSDShortConditionsParser _xauusdShortParser;
//
// DOWJONES ...
XCHStartegyDOWJONESLongConditionsParser _dowjonesLongParser;
XCHStartegyDOWJONESShortConditionsParser _dowjonesShortParser;
//
// AUDUSD ...
XCHStartegyAUDUSDLongConditionsParser _audusdLongParser;
XCHStartegyAUDUSDShortConditionsParser _audusdShortParser;
//
// NZDUSD ...
XCHStartegyNZDUSDLongConditionsParser _nzdusdLongParser;
XCHStartegyNZDUSDShortConditionsParser _nzdusdShortParser;
//
// USDCAD ...
XCHStartegyUSDCADLongConditionsParser _usdcadLongParser;
XCHStartegyUSDCADShortConditionsParser _usdcadShortParser;
//
string GenerateSignalConditions(
XSignal &signal,
@@ -783,8 +810,9 @@ struct XCHStartegyConditionsParser
//
bool IsFiltered(
XSignal &signal, // Provided Signal
XCHStrategyConditions &conditions // Market Conditions
XSignal &signal, // Provided Signal
XCHStrategyConditions &conditions, // Market Conditions
bool force = false //
)
{
//
@@ -808,11 +836,13 @@ struct XCHStartegyConditionsParser
isLong
? IsLongFiltered(
signal,
conditions //
conditions,
force //
)
: IsShortFiltered(
signal,
conditions //
conditions,
force //
)
//
;
@@ -838,6 +868,9 @@ struct XCHStartegyConditionsParser
bool isXAUUSD = _symbolParser.IsXAUUSD(signal.symbol);
bool isUSDJPY = _symbolParser.IsUSDJPY(signal.symbol);
bool isUSDCHF = _symbolParser.IsUSDCHF(signal.symbol);
bool isAUDUSD = _symbolParser.IsAUDUSD(signal.symbol);
bool isNZDUSD = _symbolParser.IsNZDUSD(signal.symbol);
bool isUSDCAD = _symbolParser.IsUSDCAD(signal.symbol);
bool isDowJones = _symbolParser.IsDowJones(signal.symbol);
//
@@ -874,6 +907,24 @@ struct XCHStartegyConditionsParser
result =
_xauusdLongParser.IsFiltered(conditions);
}
else if (isAUDUSD)
{
//
result =
_audusdLongParser.IsFiltered(conditions);
}
else if (isNZDUSD)
{
//
result =
_nzdusdLongParser.IsFiltered(conditions);
}
else if (isUSDCAD)
{
//
result =
_usdcadLongParser.IsFiltered(conditions);
}
else if (isDowJones)
{
//
@@ -906,6 +957,18 @@ struct XCHStartegyConditionsParser
//
||
//
_audusdLongParser.IsFiltered(conditions)
//
||
//
_nzdusdLongParser.IsFiltered(conditions)
//
||
//
_usdcadLongParser.IsFiltered(conditions)
//
||
//
_dowjonesLongParser.IsFiltered(conditions)
//
;
@@ -932,6 +995,9 @@ struct XCHStartegyConditionsParser
bool isXAUUSD = _symbolParser.IsXAUUSD(signal.symbol);
bool isUSDJPY = _symbolParser.IsUSDJPY(signal.symbol);
bool isUSDCHF = _symbolParser.IsUSDCHF(signal.symbol);
bool isAUDUSD = _symbolParser.IsAUDUSD(signal.symbol);
bool isNZDUSD = _symbolParser.IsNZDUSD(signal.symbol);
bool isUSDCAD = _symbolParser.IsUSDCAD(signal.symbol);
bool isDowJones = _symbolParser.IsDowJones(signal.symbol);
//
@@ -968,6 +1034,24 @@ struct XCHStartegyConditionsParser
result =
_xauusdShortParser.IsFiltered(conditions);
}
else if (isAUDUSD)
{
//
result =
_audusdShortParser.IsFiltered(conditions);
}
else if (isNZDUSD)
{
//
result =
_nzdusdShortParser.IsFiltered(conditions);
}
else if (isUSDCAD)
{
//
result =
_usdcadShortParser.IsFiltered(conditions);
}
else if (isDowJones)
{
//
@@ -1000,6 +1084,18 @@ struct XCHStartegyConditionsParser
//
||
//
_audusdShortParser.IsFiltered(conditions)
//
||
//
_nzdusdShortParser.IsFiltered(conditions)
//
||
//
_usdcadShortParser.IsFiltered(conditions)
//
||
//
_dowjonesShortParser.IsFiltered(conditions)
//
;
@@ -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 XCHStartegyUSDCADLongConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//
@@ -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 XCHStartegyUSDCADShortConditionsParser
{
//
string _version;
//
bool IsFiltered(
XCHStrategyConditions &conditions //
)
{
//
bool result = false;
//
result =
//
false
//
;
//
return result;
}
};
//