apply some changes to Pack npm scripts for support Pack and Compile Workspace ...

add XCHVWAP Indicator, extends it's Helper class and implement it's usage inside XCH strategy ...
This commit is contained in:
2024-08-03 06:14:47 +03:30
parent 8478e458c2
commit f7040490c8
17 changed files with 7689 additions and 3960 deletions
+57
View File
@@ -31,6 +31,7 @@
#include "../Helpers/x-saherelm.xchche.helper.mq5"
#include "../Helpers/x-saherelm.xchstr.helper.mq5"
#include "../Helpers/x-saherelm.xchvlm.helper.mq5"
#include "../Helpers/x-saherelm.xchvwap.helper.mq5"
//
// Base Classes ...
@@ -93,6 +94,7 @@ struct XCHStrategyConditions
XCHCHEConditions chcheConditions;
XCHSTRConditions chstrConditions;
XCHVLMConditions chvlmConditions;
XCHVWAPConditions chvwapConditions;
//
// Constructor ...
@@ -121,6 +123,7 @@ struct XCHStrategyConditions
chcheConditions.Clean();
chstrConditions.Clean();
chvlmConditions.Clean();
chvwapConditions.Clean();
}
//
@@ -226,6 +229,15 @@ struct XCHStrategyConditions
);
bullishScore += bullScore;
bearishScore += bearScore;
//
// XCHVWAP ...
chvwapConditions.GenerateScore(
bullScore,
bearScore //
);
bullishScore += bullScore;
bearishScore += bearScore;
}
//
@@ -320,6 +332,15 @@ struct XCHStrategyConditions
ignoreFalseConditions //
);
//
// XCHVWAP ...
string chvwapStr = chvwapConditions.GenerateSummary(
false,
true,
false,
ignoreFalseConditions //
);
//
string conditionsStr =
//
@@ -330,6 +351,7 @@ struct XCHStrategyConditions
chcheStr + separator +
chstrStr + separator +
chvlmStr + separator +
chvwapStr + separator +
""
//
;
@@ -607,6 +629,15 @@ public:
return result;
}
//
// XCHVWAP ...
XCHVWAPConditions chvwapConditions;
result = chvwapHelper.GetConditions(chvwapConditions);
if (!result)
{
return result;
}
//
// Start Calculations ...
@@ -654,6 +685,7 @@ public:
conditions.chstrConditions = chstrConditions;
conditions.chcheConditions = chcheConditions;
conditions.chvlmConditions = chvlmConditions;
conditions.chvwapConditions = chvwapConditions;
//
result = conditions.IsValid();
@@ -1320,6 +1352,11 @@ protected:
XCHVLMInputs chvlmInputs;
XSCXCHVLMHelper *chvlmHelper;
//
// XCHVWAP ...
XCHVWAPInputs chvwapInputs;
XSCXCHVWAPHelper *chvwapHelper;
//
//
@@ -1648,6 +1685,26 @@ private:
mPeriod,
chvlmInputs //
);
//
// XCHVWAP ...
//
chvwapInputs.Default();
//
chvwapInputs.showShort = false;
chvwapInputs.showMedium = false;
chvwapInputs.showLong = false;
chvwapInputs.showHind = false;
//
chvwapHelper = new XSCXCHVWAPHelper();
chvwapHelper.Init(
mSymbol,
mPeriod,
chvwapInputs //
);
}
//