last workd ...

This commit is contained in:
2024-05-21 17:47:03 +03:30
parent 3562732d40
commit 1d27c3444c
4 changed files with 417 additions and 112 deletions
+16 -3
View File
@@ -2710,6 +2710,9 @@ public:
return result;
}
//
mWaitsUntilNewBar = false;
//
// Validate Enable Type of Signalling ...
result = mIsLongEnable || mIsShortEnable;
@@ -2779,11 +2782,14 @@ public:
//
if (result)
{
//
mWaitsUntilNewBar = true;
//
string mConditionsStr = mConditions.GenerateSummary(true);
//
string providerTypeStr = provider + "(" + (hasLong ? "Long" : "Short") + ")" + "\n";
string providerTypeStr = GetSymbol() + ", " + provider + "(" + (hasLong ? "Long" : "Short") + ")";
mConditionsStr = providerTypeStr + "\n" + mConditionsStr;
mConditionsCollector.Add(mConditionsStr);
Print(mConditionsStr);
@@ -95056,9 +95062,16 @@ struct X5ProviderDescriptor
this.period = mPeriod;
this.allowLong = mAllowLong;
this.allowShort = mAllowShort;
//
ENUM_X5_SIGNAL_PROVIDERS tmp[];
Copy(
this.signallers,
mSignallers //
mSignallers,
tmp //
);
Copy(
tmp,
this.signallers //
);
//
+47 -3
View File
@@ -32,7 +32,7 @@ typedef void (*TX5OnSignal)(X5ProviderDescriptor &descriptor);
//
// Class Definition ...
class XSCX5EA : XSCBaseEA
class XSCX5EA : public XSCBaseEA
{
//
// Public ...
@@ -178,8 +178,46 @@ public:
) override
{
//
// TODO: Implement this ...
return 0;
bool result = 0;
//
Clean(signals);
//
int descriptorsCount = CountDescriptors();
if (descriptorsCount <= 0)
{
return result;
}
//
for (int i = 0; i < descriptorsCount; i++)
{
//
X5ProviderDescriptor iDescriptor = mDescriptors[i];
//
bool iHasSignal = iDescriptor.HasSignal();
if (iHasSignal)
{
//
// Here we Can double check Signals by Conditions
// for Score Base Filtering ...
//
AddRef(
iDescriptor.signal,
signals
//
);
}
}
//
result = ArraySize(signals);
//
return result;
}
//
@@ -251,6 +289,12 @@ private:
// a Collection of X5 Provider Descriptors ...
X5ProviderDescriptor mDescriptors[];
//
int CountDescriptors()
{
return ArraySize(mDescriptors);
}
//
// Tools ...
};