remove fibo lines from x121 indicator and also add support for rsi in data buffers ...

This commit is contained in:
2025-01-03 21:46:49 +03:30
parent a9ab5a6258
commit 6e03d6d993
8 changed files with 7722 additions and 948 deletions
+92 -17
View File
@@ -165,6 +165,28 @@ class XC121SMCExpert : public XCBaseExpert
ReConfigure();
}
/**
* Get Allow Open Trade On Signals State ...
*
* @return ( bool )
*/
bool AllowTrade()
{
return mAllowTrade;
}
/**
* Set Allow Open Trade On Signals State ...
*
* @param value: Boolean ...
*/
void AllowTrade(bool value)
{
//
mAllowTrade = value;
ReConfigure();
}
/**
* Get Use Max Allowed Signal Types Per Symbol State ...
*
@@ -806,14 +828,63 @@ class XC121SMCExpert : public XCBaseExpert
datetime currentTime = TimeCurrent();
//
// Execute Signal Using Trade Handler ...
ENUM_X_SIGNAL_EXECUTION_RESULT state;
bool isExecuted = mTradeHandler.ExecuteSignal(
signal,
conditions,
state,
false // ignore Policies ...
);
// Chack Allow Trades ...
bool allowTrade = AllowTrade();
if (allowTrade)
{
//
// Execute Signal Using Trade Handler ...
ENUM_X_SIGNAL_EXECUTION_RESULT state;
bool isExecuted = mTradeHandler.ExecuteSignal(
signal,
conditions,
state,
false // ignore Policies ...
);
}
else
{
//
// Only Alert Signals ...
string msg = (IsLong(signal.type)
? "Long"
: "Short") +
" Signal Recieved: (" +
signal.provider + "," +
signal.symbol + "," +
ToString(signal.period) +
") ...";
//
Alert(msg);
//
// Draw Signals and Conditions ...
if (eaDrawer != NULL)
{
//
XCBaseObject *objects[];
XCSignalObject *signalObject;
bool isCreated = eaDrawer.DrawSignal(
signal,
signalObject //
);
DrawX121SMCStrategyConditions(
conditions,
objects,
eaDrawer,
true, // draw Market Structure ...
true, // Draw Price Zones ...
true // Draw Decision Zones ...
);
//
Add(
(XCBaseObject *)signalObject,
objects //
);
}
}
}
//
@@ -1034,7 +1105,7 @@ class XC121SMCExpert : public XCBaseExpert
//
// Parsers ...
XSymbolParser _symbolParser;
XCPOIDrawer *poiDrawer = NULL;
eaDrawer = NULL;
//
// Single Symbol ...
@@ -1052,11 +1123,11 @@ class XC121SMCExpert : public XCBaseExpert
);
//
if (poiDrawer == NULL)
if (eaDrawer == NULL)
{
//
poiDrawer = iX121SMCStrategy
.GetDrawer();
eaDrawer = iX121SMCStrategy
.GetDrawer();
}
//
@@ -1125,11 +1196,11 @@ class XC121SMCExpert : public XCBaseExpert
);
//
if (poiDrawer == NULL)
if (eaDrawer == NULL)
{
//
poiDrawer = iX121SMCStrategy
.GetDrawer();
eaDrawer = iX121SMCStrategy
.GetDrawer();
}
//
@@ -1144,9 +1215,9 @@ class XC121SMCExpert : public XCBaseExpert
}
//
if (poiDrawer != NULL)
if (eaDrawer != NULL)
{
mTradeHandler.SetDrawer(poiDrawer);
mTradeHandler.SetDrawer(eaDrawer);
}
//
@@ -1574,6 +1645,7 @@ class XC121SMCExpert : public XCBaseExpert
// Signalling Props ...
bool mAllowLong; // Allow Long Signals ...
bool mAllowShort; // Allow Short Signals ...
bool mAllowTrade; // Allow Open Trade On Signals ...
int mMaxAllowedLongs; // Max Allowed Long Signals ...
int mMaxAllowedShorts; // Max Allowed Short Signals ...
bool mUseMaxAllowedSignalsPerSymbol; // Use Max Allowed Signal Types Per Symbol ...
@@ -1602,6 +1674,9 @@ class XC121SMCExpert : public XCBaseExpert
double mHedgingMinVolumeStep; // Minimum Volume Step for Hedging ...
double mHedgeingMinRequiredProfitPerVolumeStep; // Minimum Required Profit Per Volume Step for Hedging ...
//
XCPOIDrawer *eaDrawer; // EA Drawer ...
//
double CalculateAdditionalVolumeMultiplier(XSignal &signal)
{