141 lines
3.8 KiB
Plaintext
141 lines
3.8 KiB
Plaintext
///////////////////////////////////////////////////////
|
|
//
|
|
// 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.x121.strategy.mq5"
|
|
|
|
//
|
|
#include "./Olds/x-saherelm.x121.amarkets.us30.olds.long.parser.mq5"
|
|
#include "./2018/x-saherelm.x121.amarkets.us30.2018.long.parser.mq5"
|
|
#include "./2019/x-saherelm.x121.amarkets.us30.2019.long.parser.mq5"
|
|
#include "./2020/x-saherelm.x121.amarkets.us30.2020.long.parser.mq5"
|
|
#include "./2021/x-saherelm.x121.amarkets.us30.2021.long.parser.mq5"
|
|
#include "./2022/x-saherelm.x121.amarkets.us30.2022.long.parser.mq5"
|
|
#include "./2023/x-saherelm.x121.amarkets.us30.2023.long.parser.mq5"
|
|
#include "./2024/x-saherelm.x121.amarkets.us30.2024.long.parser.mq5"
|
|
|
|
//
|
|
// Conditions Parser ...
|
|
struct X121StartegyAMarketsUS30LongConditionsParser
|
|
{
|
|
//
|
|
string _version;
|
|
|
|
//
|
|
X121StartegyAMarketsUS30OldsLongConditionsParser _oldsParser;
|
|
X121StartegyAMarketsUS302018LongConditionsParser _2018Parser;
|
|
X121StartegyAMarketsUS302019LongConditionsParser _2019Parser;
|
|
X121StartegyAMarketsUS302020LongConditionsParser _2020Parser;
|
|
X121StartegyAMarketsUS302021LongConditionsParser _2021Parser;
|
|
X121StartegyAMarketsUS302022LongConditionsParser _2022Parser;
|
|
X121StartegyAMarketsUS302023LongConditionsParser _2023Parser;
|
|
X121StartegyAMarketsUS302024LongConditionsParser _2024Parser;
|
|
|
|
//
|
|
bool IsFiltered(
|
|
XSignal &signal,
|
|
X121StrategyConditions &conditions,
|
|
bool force = true //
|
|
)
|
|
{
|
|
//
|
|
bool result = false;
|
|
|
|
//
|
|
if (!force)
|
|
{
|
|
//
|
|
result =
|
|
//
|
|
_2024Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2023Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2022Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2021Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2020Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2019Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2018Parser.IsFiltered(conditions)
|
|
//
|
|
;
|
|
}
|
|
else
|
|
{
|
|
//
|
|
result =
|
|
//
|
|
_2024Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2023Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2022Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2021Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2020Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2019Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_2018Parser.IsFiltered(conditions)
|
|
//
|
|
||
|
|
//
|
|
_oldsParser.IsFiltered(conditions)
|
|
//
|
|
;
|
|
}
|
|
|
|
//
|
|
return result;
|
|
}
|
|
};
|
|
|
|
// |