This commit is contained in:
2024-06-24 18:28:48 +03:30
parent ba23e2d9e9
commit e41548979e
2 changed files with 137 additions and 62 deletions
+136 -61
View File
@@ -1991,83 +1991,158 @@ public:
for (int i = 0; i < count; i++) for (int i = 0; i < count; i++)
{ {
// //
double iEntry = data[i].entry;
string iSymbol = data[i].symbol; string iSymbol = data[i].symbol;
ENUM_TIMEFRAMES iPeriod = data[i].period; ENUM_TIMEFRAMES iPeriod = data[i].period;
ENUM_X_POSITION_TYPES iType = data[i].type;
// //
double hotLevels[]; bool isLong = IsLong(iType);
ENUM_POSITION_TYPE iPType = isLong
? POSITION_TYPE_BUY
: POSITION_TYPE_SELL;
// //
AddSpecific( double cEntry = GetEntry(
0.25,
hotLevels //
);
//
AddSpecific(
0.20,
hotLevels //
);
//
AddSpecific(
0.12,
hotLevels //
);
//
XSCZonesInput zonesInput;
zonesInput.length = 71;
zonesInput.numberOfZones = 10;
XSCZones *zones = new XSCZones(
iSymbol, iSymbol,
_Period // iPType //
); );
// //
zonesInput.AddLevelColor( XOHCL cBar;
hotLevels[0], bool isInited = cBar.Init(
clrRed //
);
zonesInput.AddLevelColor(
hotLevels[1],
clrOrange //
);
zonesInput.AddLevelColor(
hotLevels[2],
clrLightCoral //
);
bool canUseZones = zones.Init(zonesInput);
//
XSCCFInput cfInputs;
cfInputs.Default();
XSCCF *cf = new XSCCF(
iSymbol, iSymbol,
_Period // iPeriod,
1 //
); );
bool canUseCF = cf.Init(cfInputs); if (!isInited)
{
continue;
}
// //
XSCTrendInput tInputs; bool isBullish = cBar.IsBullish();
tInputs.Default(); bool isBreakUp = cBar.IsBreakUp(iEntry);
XSCTrend *trend = new XSCTrend(
iSymbol,
_Period //
);
bool canUseTrend = trend.Init(tInputs);
if (canUseCF && canUseTrend && canUseZones) //
bool isBearish = cBar.IsBearish();
bool isBreakDown = cBar.IsBreakDown(iEntry);
//
bool isBreaked =
isLong
? isBullish && isBreakUp && cEntry > iEntry
: isBearish && isBreakDown && cEntry < iEntry;
//
if (isBreaked)
{ {
// //
// cf.Draw(); // Update Date of TradeInfo ...
trend.Draw(); data[i].entry = cEntry;
// zones.Draw(); data[i].time = TimeCurrent();
Print("Use CF ...");
// cf.Remove(); //
// trend.Remove(); // Generate Signal ...
// zones.Remove(); XSignal iSignal;
bool isPrepared = iSignal.Prepare(
data[i].symbol,
data[i].provider,
data[i].period,
iPType,
X_ORDER_MODE_MARKET,
data[i].entry,
data[i].volume,
0,
0 //
);
//
// Add Signal to Result ...
if (isPrepared)
{
//
AddRef(
iSignal,
signals //
);
}
} }
// //
// double hotLevels[];
// //
// AddSpecific(
// 0.25,
// hotLevels //
// );
// //
// AddSpecific(
// 0.20,
// hotLevels //
// );
// //
// AddSpecific(
// 0.12,
// hotLevels //
// );
// //
// XSCZonesInput zonesInput;
// zonesInput.length = 71;
// zonesInput.numberOfZones = 10;
// XSCZones *zones = new XSCZones(
// iSymbol,
// _Period //
// );
// //
// zonesInput.AddLevelColor(
// hotLevels[0],
// clrRed //
// );
// zonesInput.AddLevelColor(
// hotLevels[1],
// clrOrange //
// );
// zonesInput.AddLevelColor(
// hotLevels[2],
// clrLightCoral //
// );
// bool canUseZones = zones.Init(zonesInput);
// //
// XSCCFInput cfInputs;
// cfInputs.Default();
// XSCCF *cf = new XSCCF(
// iSymbol,
// _Period //
// );
// bool canUseCF = cf.Init(cfInputs);
// //
// XSCTrendInput tInputs;
// tInputs.Default();
// XSCTrend *trend = new XSCTrend(
// iSymbol,
// _Period //
// );
// bool canUseTrend = trend.Init(tInputs);
// if (canUseCF && canUseTrend && canUseZones)
// {
// //
// // cf.Draw();
// trend.Draw();
// // zones.Draw();
// Print("Use CF ...");
// // cf.Remove();
// // trend.Remove();
// // zones.Remove();
// }
} }
// //
@@ -3571,8 +3646,8 @@ public:
bool allowShort = AllowShort(); bool allowShort = AllowShort();
// //
bool useCMarket = false; bool useCMarket = true;
bool useSMarket = true; bool useSMarket = false;
bool useMMarket = false; bool useMMarket = false;
bool useLMarket = false; bool useLMarket = false;
bool useHMarket = false; bool useHMarket = false;
+1 -1
View File
@@ -49,7 +49,7 @@ input bool x121EAUseAllSymbols = false; // Use All Availabl
input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols input bool x121EAUseAllWatchListSymbols = false; // Use All WatchList Symbols
input bool x121EAAllowLong = true; // Allow Long Trades input bool x121EAAllowLong = true; // Allow Long Trades
input bool x121EAAllowShort = true; // Allow Short Trades input bool x121EAAllowShort = true; // Allow Short Trades
input bool x121EAExecuteSignalsOnBreakout = false; // Execute Signals On Breakouts input bool x121EAExecuteSignalsOnBreakout = true; // Execute Signals On Breakouts
input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals input int x121EADelayBetweenTwoSignal = 5; // Delay Between two Same Signals
input int x121EAReuiredSignalVerifications = 3; // Required Verifications for Signals input int x121EAReuiredSignalVerifications = 3; // Required Verifications for Signals
input bool x121EAGetVerificationFromOtherTimeFrames = false; // Get Verifications from Other Time Frames input bool x121EAGetVerificationFromOtherTimeFrames = false; // Get Verifications from Other Time Frames