refactore some inpust and also start implementing Scoring mechanism ...

This commit is contained in:
2024-05-20 12:27:23 +03:30
parent 8a0544ed8a
commit d7b179a136
4 changed files with 1737 additions and 356 deletions
File diff suppressed because it is too large Load Diff
+5 -4
View File
@@ -72,15 +72,16 @@ public:
// //
// Generate Score ... // Generate Score ...
virtual void GenerateScore( virtual void GenerateScore(
double &bullishScore, // Bullish Score double &bullishScore, // Bullish Score
double &bearishScore, // Bearish Score double &bearishScore, // Bearish Score
const double multiplier = 1 // Score Multiplier double multiplier = 1 // Score Multiplier
); );
// //
// Generate Summary ... // Generate Summary ...
virtual string GenerateSummary( virtual string GenerateSummary(
const double multiplier = 1, // Score Multiplier const bool onlySummary = false, // Only Generate Conditions Summary
double multiplier = 1, // Score Multiplier
const string separator = "\n", // Separator const string separator = "\n", // Separator
const bool ignoreFalseConditions = true // Ignore False Conditions const bool ignoreFalseConditions = true // Ignore False Conditions
); );
+14
View File
@@ -101,6 +101,20 @@ int OnInit()
return INIT_PARAMETERS_INCORRECT; return INIT_PARAMETERS_INCORRECT;
} }
//
// Enable Required Signallers and Types ...
x5Provider.SetSignalTypeState(
POSITION_TYPE_BUY,
true);
x5Provider.SetSignalTypeState(
POSITION_TYPE_SELL,
true);
//
ENUM_X5_SIGNAL_PROVIDERS providers[];
GetAllX5SignalProviders(providers);
x5Provider.SetSignalProviderStates(providers, true);
// //
// Init Succeed ... // Init Succeed ...
return INIT_SUCCEEDED; return INIT_SUCCEEDED;
+31
View File
@@ -4864,6 +4864,37 @@ string ToString(
return result; return result;
} }
//
string SetLabel(
string mLabel, // Provided Label ...
string value, // Source Value ...
string separator = "\n", // Line Separator
bool addTopEmptyLine = true // Add Empty Line On top
)
{
//
string result = value;
//
if (StringLen(mLabel) <= 0)
{
return result;
}
//
result = (StringLen(value) > 0)
? (addTopEmptyLine ? separator : "") +
mLabel +
separator +
"-----------------------------" +
separator +
value
: value;
//
return result;
}
// //
// Converts a Buffer to String Representation ... // Converts a Buffer to String Representation ...
template <typename T> template <typename T>