remove backup files ...

This commit is contained in:
2025-02-12 01:27:26 +03:30
parent 44f2a9baba
commit 8f1ab5f8bd
24 changed files with 0 additions and 55412 deletions
File diff suppressed because it is too large Load Diff
-138
View File
@@ -1,138 +0,0 @@
//
// Detect New Order Blocks ...
bool hasNewBullishOB = Contains(
X_BULLISH_ORDERBLOCK_DETECTED,
consolidationPoiEvents //
);
bool hasNewBearishOB = Contains(
X_BEARISH_ORDERBLOCK_DETECTED,
consolidationPoiEvents //
);
bool hasNewOB = hasNewBullishOB ||
hasNewBearishOB;
result = hasNewOB;
if (!result)
{
return result;
}
//
// Make Sure New Order Block Detected ...
XCOrderBlock *liveOB = NULL;
if (hasNewBullishOB)
{
//
bool hasBullishOBs = consolidationState.HasBullishOrderBlocks();
int bullishOBsCount = consolidationState.CountBullishOrderBlocks();
if (hasBullishOBs)
{
liveOB = consolidationState.bullishOrderBlocks[bullishOBsCount - 1];
}
}
else if (hasNewBearishOB)
{
//
bool hasBearishOBs = consolidationState.HasBearishOrderBlocks();
int bearishOBsCount = consolidationState.CountBearishOrderBlocks();
if (hasBearishOBs)
{
liveOB = consolidationState.bearishOrderBlocks[bearishOBsCount - 1];
}
}
bool hasLiveOB = liveOB != NULL &&
liveOB.IsValid();
result = hasLiveOB;
if (!result)
{
return result;
}
//
bool isLiveOBBullish = liveOB.IsBullish();
bool isLiveOBBearish = liveOB.IsBearish();
//
ENUM_X_DIRECTION forDir =
isLiveOBBullish
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
XOHCL startedBar;
ENUM_X_DIRECTION startedDir;
bool isLiveOBStarted = liveOB.IsStarted(
forDir,
startedBar,
startedDir //
);
//
XOHCL activatedBar;
ENUM_X_DIRECTION activatedDir;
bool isLiveOBActivated = liveOB.IsActivated(
forDir,
activatedBar,
activatedDir //
);
//
// DRAW ...
//
//
if (isLiveOBStarted)
{
//
XCOHCLObject *barObj;
bool isCreated = consolidationCycleHelper
.mPOIDrawer
.CreateBar(
startedBar,
barObj //
);
}
//
if (isLiveOBActivated)
{
//
XCOHCLObject *barObj;
bool isCreated = consolidationCycleHelper
.mPOIDrawer
.CreateBar(
activatedBar,
barObj //
);
if (isCreated)
{
//
barObj.BodyColor(clrGold);
barObj.HighShadowColor(clrGold);
barObj.LowShadowColor(clrGold);
}
}
//
// Draw Live OB ...
if (isLiveOBBullish)
{
//
XCBullishOrderBlockObject *iObj;
bool isCreated = consolidationCycleHelper
.mPOIDrawer
.CreateBullishOrderBlock(
liveOB,
iObj //
);
}
else
{
//
XCBearishOrderBlockObject *iObj;
bool isCreated = consolidationCycleHelper
.mPOIDrawer
.CreateBearishOrderBlock(
liveOB,
iObj //
);
}
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-199
View File
@@ -1,199 +0,0 @@
//
// DRAW ...
//
//
XCBaseObject *drawnObjects[];
// //
// if (hasYoungestBullOB)
// {
// //
// XCBullishOrderBlockObject *iObj;
// bool isCreated = drawer
// .CreateBullishOrderBlock(
// youngestBullOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObj,
// drawnObjects //
// );
// }
// }
// //
// if (hasYoungestBearOB)
// {
// //
// XCBearishOrderBlockObject *iObj;
// bool isCreated = drawer
// .CreateBearishOrderBlock(
// youngestBearOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObj,
// drawnObjects //
// );
// }
// }
// //
// // Draw Breaked Bullish OrderBlocks ...
// if (hasBreakedBullOBs)
// {
// //
// for (int i = 0; i < breakedBullOBsCount; i++)
// {
// //
// XCOrderBlock *iOB = breakedBullOBs[i];
// // iOB.To(cTime);
// //
// XCBullishOrderBlockObject *iObj;
// bool isCreated = drawer
// .CreateBullishOrderBlock(
// iOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObj,
// drawnObjects //
// );
// }
// }
// }
// //
// // Draw Breaked Bearish OrderBlocks ...
// if (hasBreakedBearOBs)
// {
// //
// for (int i = 0; i < breakedBearOBsCount; i++)
// {
// //
// XCOrderBlock *iOB = breakedBearOBs[i];
// // iOB.To(cTime);
// //
// XCBearishOrderBlockObject *iObj;
// bool isCreated = drawer
// .CreateBearishOrderBlock(
// iOB,
// iObj //
// );
// //
// if (isCreated)
// {
// //
// Add(
// (XCBaseObject *)iObj,
// drawnObjects //
// );
// }
// }
// }
//
// Draw Tests ...
if (hasTests)
{
//
for (int i = 0; i < testsCount; i++)
{
//
XOBTest iTest = tests[i];
//
bool hasOB = iTest.HasOB();
if (hasOB)
{
//
bool isBullish = iTest.ob.IsBullish();
//
XCBaseObject *obObj;
bool isCreated = drawer
.CreateOrderBlock(
iTest.ob,
obObj //
);
if (isCreated)
{
//
Add(
obObj,
drawnObjects //
);
}
}
//
// bool hasFVGs = iTest.HasFVGs();
// int fvgsCount = iTest.CountFVGs();
// for (int j = 0; j < fvgsCount; j++)
// {
// //
// XCFVG *jFVG = iTest.fvgs[j];
// // jFVG.To(iTest.ob.To());
// //
// XCBaseObject *fvgObj;
// bool isCreated = drawer
// .CreateFairValueGap(
// jFVG,
// fvgObj //
// );
// if (isCreated)
// {
// //
// Add(
// fvgObj,
// drawnObjects //
// );
// }
// }
//
bool hasFVG = iTest.fvg != NULL &&
iTest.fvg.IsValid();
if (hasFVG)
{
//
XCBaseObject *fvgObj;
bool isCreate = drawer.CreateFairValueGap(
iTest.fvg,
fvgObj //
);
if (isCreate)
{
//
Add(
fvgObj,
drawnObjects //
);
}
}
}
}
//
// END DRAW ...
//
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
-111
View File
@@ -1,111 +0,0 @@
//+------------------------------------------------------------------+
//| BOS_CHOCH.mq5|
//| Copyright 2023, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2023, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
#property indicator_color1 clrGreen
#property indicator_color2 clrRed
#property indicator_width1 2
#property indicator_width2 2
// Indicator Buffers
double BOSBuffer[];
double CHOCHBuffer[];
// Input parameters
input int lookbackPeriod = 50; // Number of candles to look back for structure analysis
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
// Set up indicator buffers
SetIndexBuffer(0, BOSBuffer, INDICATOR_DATA);
SetIndexBuffer(1, CHOCHBuffer, INDICATOR_DATA);
// Set up indicator labels
IndicatorSetString(INDICATOR_SHORTNAME, "BOS & CHOCH Detector");
IndicatorSetInteger(INDICATOR_DIGITS, _Digits);
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
// Loop through all candles
for (int i = prev_calculated; i < rates_total; i++)
{
// Detect BOS (Break of Structure)
if (IsBOS(i, high, low, lookbackPeriod))
{
BOSBuffer[i] = high[i]; // Mark BOS on the chart
}
else
{
BOSBuffer[i] = EMPTY_VALUE;
}
// Detect CHOCH (Change of Character)
if (IsCHOCH(i, high, low, lookbackPeriod))
{
CHOCHBuffer[i] = low[i]; // Mark CHOCH on the chart
}
else
{
CHOCHBuffer[i] = EMPTY_VALUE;
}
}
return(rates_total);
}
//+------------------------------------------------------------------+
//| Function to detect Break of Structure (BOS) |
//+------------------------------------------------------------------+
bool IsBOS(int index, const double &high[], const double &low[], int lookback)
{
// Check if the current high is higher than the previous highs
for (int i = 1; i <= lookback; i++)
{
if (index - i >= 0 && high[index] <= high[index - i])
{
return false;
}
}
return true;
}
//+------------------------------------------------------------------+
//| Function to detect Change of Character (CHOCH) |
//+------------------------------------------------------------------+
bool IsCHOCH(int index, const double &high[], const double &low[], int lookback)
{
// Check if the current low is lower than the previous lows
for (int i = 1; i <= lookback; i++)
{
if (index - i >= 0 && low[index] >= low[index - i])
{
return false;
}
}
return true;
}
-288
View File
@@ -1,288 +0,0 @@
#include "../Signals/x-121.smc.xobs.signal.lib.mq5"
bool useXOBSSignal;
useXOBSSignal = false;
bool hasXOBSSignal = false;
//
// XOBS Signal ...
if (useXOBSSignal && !hasSignal)
{
//
hasXOBSSignal = DetectXOBSSignal(conditions);
hasSignal = hasXOBSSignal;
}
Clean(mX121SMCXOBSConditionsCollection);
//
// XOBS Guard Detection ...
if (useXOBSSignal)
{
// //
// bool hasGuard = DetectX121SMCXOBSGuards(
// guards,
// positions,
// mTriggerCycleHelper,
// mDecisionCycleHelper,
// mAnalyseCycleHelper,
// mVerificationCycleHelper,
// mConsolidationCycleHelper,
// mVisionCycleHelper //
// );
}
//
// XOBS Signal ...
bool DetectXOBSSignal(
X121SMCStrategyConditions &conditions //
)
{
//
bool result = false;
//
bool isBullish = false;
bool isBearish = false;
//
int zIndex = 0;
int cIndex = zIndex + 1;
int pIndex = cIndex + 1;
int ppIndex = pIndex + 1;
//
string symbol = GetSymbol();
ENUM_TIMEFRAMES period = GetPeriod();
//
XOHCL zBar;
result = zBar.Init(
symbol,
period,
zIndex //
);
if (!result)
{
return result;
}
//
XOHCL cBar;
result = cBar.Init(
symbol,
period,
cIndex //
);
if (!result)
{
return result;
}
//
XOHCL pBar;
result = pBar.Init(
symbol,
period,
pIndex //
);
if (!result)
{
return result;
}
//
double cLL = cBar.FindLowest(7, MODE_LOW);
double cHH = cBar.FindHighest(7, MODE_HIGH);
//
datetime cTime = TimeCurrent();
//
ENUM_X_121_SMC_PROVIDERS provider = X_121_SMC_PROVIDER_XOBS;
string providerStr = ToString(provider);
//
// Detect Setup Conditions ...
datetime setupTime = mX121SMCXOBSConditions.setupTime;
bool isSetuped = mX121SMCXOBSConditions.IsSetuped();
ENUM_X_DIRECTION setupDir = mX121SMCXOBSConditions.dir;
if (!isSetuped)
{
//
// Detect Signal Setup ...
// isSetuped = DetectX121SMCXOBSSignalSetup(
// symbol,
// period,
// mX121SMCXOBSConditions,
// mTriggerCycleHelper,
// mDecisionCycleHelper,
// mAnalyseCycleHelper,
// mVerificationCycleHelper,
// mConsolidationCycleHelper,
// mVisionCycleHelper //
// );
//
setupDir = mX121SMCXOBSConditions.dir;
setupTime = mX121SMCXOBSConditions.setupTime;
//
if (isSetuped)
{
//
int items = AddX121SMCXOBSConditionsIfNotExists(
mX121SMCXOBSConditions,
mX121SMCXOBSConditionsCollection //
);
//
mX121SMCXOBSConditions.Clean();
}
}
//
int conditionsCount = ArraySize(mX121SMCXOBSConditionsCollection);
result = IsValidSize(conditionsCount);
if (!result)
{
return result;
}
//
// Looking For Conditions ...
int selectedIndex = 0;
X121SMCStrategyXOBSSignalConditions mTmpConditions[];
Copy(
mX121SMCXOBSConditionsCollection,
mTmpConditions //
);
X121SMCStrategyXOBSSignalConditions mConditions;
for (int i = 0; i < conditionsCount; i++)
{
//
// Check Triggers ...
bool canTrigger = mTmpConditions[i].CanTrigger();
datetime triggerTime = mTmpConditions[i].triggerTime;
if (!canTrigger)
{
//
// Detect Signal Trigger ...
// canTrigger = DetectX121SMCXOBSSignalTrigger(
// mTmpConditions[i],
// symbol,
// period,
// mTriggerCycleHelper,
// mDecisionCycleHelper,
// mAnalyseCycleHelper,
// mVerificationCycleHelper,
// mConsolidationCycleHelper,
// mVisionCycleHelper //
// );
//
result = canTrigger;
if (!result)
{
//
bool isISetuped = mTmpConditions[i].IsSetuped();
if (!isISetuped)
{
//
ArrayRemove(
mX121SMCXOBSConditionsCollection,
i,
1 //
);
}
continue;
}
//
triggerTime = mTmpConditions[i].triggerTime;
}
//
if (canTrigger)
{
//
selectedIndex = i;
mConditions = mTmpConditions[i];
break;
}
}
//
result = IsValid(mConditions.setupTime) &&
HasDirection(mConditions.dir);
if (!result)
{
return result;
}
//
// Remove Selected Index from Main Collection ...
ArrayRemove(
mX121SMCXOBSConditionsCollection,
selectedIndex,
1 //
);
//
// Check Signal Direction ...
isBullish = IsBullish(mConditions.dir);
isBearish = IsBearish(mConditions.dir);
result = isBullish ||
isBearish;
if (!result)
{
return result;
}
//
// Issues Signal on Conditions ...
conditions.sl = mConditions.sl;
conditions.provider = providerStr;
conditions.signalDir = mConditions.dir;
conditions.target = mConditions.target;
//
return result;
}
//////////////////////////////////////////////////////////////////////////
X_121_SMC_PROVIDER_XOBS,
//
case X_121_SMC_PROVIDER_XOBS:
result = X121SMCXOBSToken;
break;
else if (Contains(X121SMCXOBSToken, value))
{
result = X_121_SMC_PROVIDER_XOBS;
}
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff