Fix all Refactors issues on X121SMC for start Implementing Strategy ...
This commit is contained in:
@@ -2934,9 +2934,26 @@ struct XPOIState
|
||||
//
|
||||
string symbol;
|
||||
ENUM_TIMEFRAMES period;
|
||||
datetime reportedAt;
|
||||
datetime time;
|
||||
|
||||
//
|
||||
XCTicksZone *ticksZone; // Ticks Zone ...
|
||||
|
||||
//
|
||||
XCSwing *swingHighs[]; // Holds Founded Swing Highs ...
|
||||
XCSwing *swingLows[]; // Holds Founded Swing Lows ...
|
||||
XCMomentumBar *bullishMomentumBars[]; // Holds Founded Bullish Momentum Bars ...
|
||||
XCMomentumBar *bearishMomentumBars[]; // Holds Founded Bearish Momentum Bars ...
|
||||
XCRejectionBar *bullishRejectionBars[]; // Holds Founded Bullish Rejection Bars ...
|
||||
XCRejectionBar *bearishRejectionBars[]; // Holds Founded Bearish Rejection Bars ...
|
||||
XCSupportZone *supportZones[]; // Holds Founded Support Zones ...
|
||||
XCResistanceZone *resistanceZones[]; // Holds Founded Resistance Zones ...
|
||||
XCSupplyZone *supplyZones[]; // Holds Founded Supply Zones ...
|
||||
XCDemandZone *demandZones[]; // Holds Founded Demand Zones ...
|
||||
XCOrderBlock *bullishOrderBlocks[]; // Holds Founded Bullish Order Blocks ...
|
||||
XCOrderBlock *bearishOrderBlocks[]; // Holds Founded Bearish Order Blocks ...
|
||||
XCFVG *bullishFairValueGaps[]; // Holds Founded Bullish Fair Value Gaps ...
|
||||
XCFVG *bearishFairValueGaps[]; // Holds Founded Bearish Fair Value Gaps ...
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
@@ -2956,7 +2973,26 @@ struct XPOIState
|
||||
//
|
||||
symbol = NULL;
|
||||
period = NULL;
|
||||
reportedAt = NULL;
|
||||
time = NULL;
|
||||
|
||||
//
|
||||
ticksZone.Clean();
|
||||
|
||||
//
|
||||
Clean(swingHighs);
|
||||
Clean(swingLows);
|
||||
Clean(bullishMomentumBars);
|
||||
Clean(bearishMomentumBars);
|
||||
Clean(bullishRejectionBars);
|
||||
Clean(bearishRejectionBars);
|
||||
Clean(supportZones);
|
||||
Clean(resistanceZones);
|
||||
Clean(supplyZones);
|
||||
Clean(demandZones);
|
||||
Clean(bullishOrderBlocks);
|
||||
Clean(bearishOrderBlocks);
|
||||
Clean(bullishFairValueGaps);
|
||||
Clean(bearishFairValueGaps);
|
||||
}
|
||||
|
||||
//
|
||||
@@ -3215,6 +3251,141 @@ string ToString(ENUM_XPOI_EVENTS value)
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Combine a Collection of States into dest ...
|
||||
*
|
||||
* @param dest: XPOIState instance ...
|
||||
* @param source: XPOIState Collection ...
|
||||
*/
|
||||
void CombineStates(
|
||||
XPOIState &dest,
|
||||
XPOIState &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
dest.Clean();
|
||||
|
||||
//
|
||||
int count = ArraySize(source);
|
||||
if (!IsValidSize(count))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XPOIState iState = source[i];
|
||||
|
||||
//
|
||||
if (dest.ticksZone == NULL)
|
||||
{
|
||||
dest.ticksZone = iState.ticksZone;
|
||||
}
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.swingHighs,
|
||||
dest.swingHighs,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.swingLows,
|
||||
dest.swingLows,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishMomentumBars,
|
||||
dest.bullishMomentumBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishMomentumBars,
|
||||
dest.bearishMomentumBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishRejectionBars,
|
||||
dest.bullishRejectionBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishRejectionBars,
|
||||
dest.bearishRejectionBars,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.supportZones,
|
||||
dest.supportZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.resistanceZones,
|
||||
dest.resistanceZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.supplyZones,
|
||||
dest.supplyZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.demandZones,
|
||||
dest.demandZones,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishOrderBlocks,
|
||||
dest.bullishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishOrderBlocks,
|
||||
dest.bearishOrderBlocks,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bullishFairValueGaps,
|
||||
dest.bullishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
Copy(
|
||||
iState.bearishFairValueGaps,
|
||||
dest.bearishFairValueGaps,
|
||||
false //
|
||||
);
|
||||
|
||||
//
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
typedef void (*TOnPOIEvent)(ENUM_XPOI_EVENTS event,
|
||||
XCBasePOI *param //
|
||||
|
||||
Reference in New Issue
Block a user