last ...
This commit is contained in:
@@ -2076,3 +2076,75 @@
|
|||||||
// m1.Fill(mOrderFlow[pivotIDX].state);
|
// m1.Fill(mOrderFlow[pivotIDX].state);
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
//////////////////////////////////
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Detect SL Candidates based on Strategy and Conditions ...
|
||||||
|
*
|
||||||
|
* @param result: Double array reference ...
|
||||||
|
* @param entry: Double, Position Entry Price ...
|
||||||
|
* @param conditions: X121SMCStrategyConditions instance, Provides Configurations ...
|
||||||
|
* @param type: ENUM_X_POSITION_TYPES member, Specified Position Type ...
|
||||||
|
*/
|
||||||
|
void DetectSLCandidates(
|
||||||
|
double &result[],
|
||||||
|
double entry,
|
||||||
|
X121SMCStrategyConditions &conditions,
|
||||||
|
ENUM_X_POSITION_TYPES type //
|
||||||
|
) override
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Clean(result);
|
||||||
|
|
||||||
|
//
|
||||||
|
int cIndex = 1;
|
||||||
|
|
||||||
|
//
|
||||||
|
if (entry <= 0 ||
|
||||||
|
!conditions.IsValid() ||
|
||||||
|
type == X_POSITION_TYPE_ALL ||
|
||||||
|
type == X_POSITION_TYPE_NONE)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.x3vwapConditions.fasts[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.x3vwapConditions.mids[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.x3vwapConditions.slows[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.x3maConditions.fasts[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.xpvConditions.vales[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
Add(
|
||||||
|
conditions.xpvConditions.peaks[cIndex],
|
||||||
|
result //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
}
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
// ------------
|
// ------------
|
||||||
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////x
|
//////////////////////////////////////////////////////
|
||||||
//
|
//
|
||||||
// Global Properties ...
|
// Global Properties ...
|
||||||
#property copyright "Copyright 2023, SaherElm IT Center"
|
#property copyright "Copyright 2023, SaherElm IT Center"
|
||||||
|
|||||||
@@ -262,6 +262,40 @@ ENUM_X_POSITION_TYPES GetOppositPositionType(ENUM_POSITION_TYPE type)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION ToDirection(ENUM_POSITION_TYPE value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION result = X_DIRECTION_NONE;
|
||||||
|
|
||||||
|
//
|
||||||
|
result = IsLong(value)
|
||||||
|
? X_DIRECTION_BULLISH
|
||||||
|
: X_DIRECTION_BEARISH;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION ToDirection(ENUM_X_POSITION_TYPES value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION result = X_DIRECTION_NONE;
|
||||||
|
|
||||||
|
//
|
||||||
|
result = value == X_POSITION_TYPE_ALL
|
||||||
|
? X_DIRECTION_ALL
|
||||||
|
: value == X_POSITION_TYPE_LONG
|
||||||
|
? X_DIRECTION_BULLISH
|
||||||
|
: value == X_POSITION_TYPE_SHORT
|
||||||
|
? X_DIRECTION_BEARISH
|
||||||
|
: X_DIRECTION_NONE;
|
||||||
|
|
||||||
|
//
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Structs ...
|
// Structs ...
|
||||||
|
|
||||||
|
|||||||
@@ -359,6 +359,10 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Detect Fair Value Gaps ...
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
bool isOrderFlowBullish = IsBullish(mOrderFlowDir);
|
bool isOrderFlowBullish = IsBullish(mOrderFlowDir);
|
||||||
|
|
||||||
@@ -419,14 +423,6 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
;
|
;
|
||||||
|
|
||||||
//
|
|
||||||
if (hasCHOCH)
|
|
||||||
{
|
|
||||||
// RedrawOrderFlow();
|
|
||||||
mLastCHOCHOn = TimeCurrent();
|
|
||||||
// ClearDraws();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Check PSar is Equals to Peak or Vale ...
|
// Check PSar is Equals to Peak or Vale ...
|
||||||
bool isSAREqualsToPeak =
|
bool isSAREqualsToPeak =
|
||||||
@@ -751,17 +747,6 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
);
|
);
|
||||||
|
|
||||||
//
|
//
|
||||||
// double candidates[];
|
|
||||||
// DetectSLCandidates(
|
|
||||||
// candidates,
|
|
||||||
// entry,
|
|
||||||
// conditions,
|
|
||||||
// xType //
|
|
||||||
// );
|
|
||||||
// double selectedSL =
|
|
||||||
// hasLong
|
|
||||||
// ? GetMax(candidates)
|
|
||||||
// : GetMin(candidates);
|
|
||||||
sl =
|
sl =
|
||||||
hasLong
|
hasLong
|
||||||
? selectedSL - pip2
|
? selectedSL - pip2
|
||||||
@@ -798,7 +783,75 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
{
|
{
|
||||||
//
|
//
|
||||||
Print("PRV: ", provider);
|
Print("PRV: ", provider);
|
||||||
RedrawOrderFlow();
|
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION forDir = ToDirection(signal.type);
|
||||||
|
bool ignoreSwingHighs = false;
|
||||||
|
bool ignoreSwingLows = false;
|
||||||
|
bool ignoreSupportZones = false;
|
||||||
|
bool ignoreResistanceZones = false;
|
||||||
|
bool ignoreSupplyZones = false;
|
||||||
|
bool ignoreDemandZones = false;
|
||||||
|
bool ignoreBullishOrderBlocks = false;
|
||||||
|
bool ignoreBearishOrderBlocks = false;
|
||||||
|
bool ignoreBullishFairValueGaps = false;
|
||||||
|
bool ignoreBearishFairValueGaps = false;
|
||||||
|
bool ignoreBullishRejectionBars = false;
|
||||||
|
bool ignoreBearishRejectionBars = false;
|
||||||
|
bool ignoreBullishMomentumBars = false;
|
||||||
|
bool ignoreBearishMomentumBars = false;
|
||||||
|
if (IsBullish(forDir))
|
||||||
|
{
|
||||||
|
//
|
||||||
|
ignoreSwingLows = false;
|
||||||
|
ignoreDemandZones = false;
|
||||||
|
ignoreSupportZones = false;
|
||||||
|
ignoreBullishOrderBlocks = false;
|
||||||
|
ignoreBullishFairValueGaps = false;
|
||||||
|
ignoreBullishRejectionBars = false;
|
||||||
|
ignoreBullishMomentumBars = false;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//
|
||||||
|
ignoreSwingHighs = true;
|
||||||
|
ignoreSupplyZones = true;
|
||||||
|
ignoreResistanceZones = true;
|
||||||
|
ignoreBearishOrderBlocks = true;
|
||||||
|
ignoreBearishFairValueGaps = false;
|
||||||
|
ignoreBearishRejectionBars = true;
|
||||||
|
ignoreBearishMomentumBars = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
RedrawOrderFlow(
|
||||||
|
true, // Force Clean ...
|
||||||
|
false, // Same Period ...
|
||||||
|
true, // Order Flow ...
|
||||||
|
true, // Order Flow State ...
|
||||||
|
false, // Only Last Order Flow ...
|
||||||
|
true, // Only Last Order Flow State ...
|
||||||
|
//
|
||||||
|
forDir, // Direction Force ...
|
||||||
|
ignoreSwingHighs,
|
||||||
|
ignoreSwingLows,
|
||||||
|
ignoreSupportZones,
|
||||||
|
ignoreResistanceZones,
|
||||||
|
ignoreSupplyZones,
|
||||||
|
ignoreDemandZones,
|
||||||
|
ignoreBullishOrderBlocks,
|
||||||
|
ignoreBearishOrderBlocks,
|
||||||
|
ignoreBullishFairValueGaps,
|
||||||
|
ignoreBearishFairValueGaps,
|
||||||
|
ignoreBullishRejectionBars,
|
||||||
|
ignoreBearishRejectionBars,
|
||||||
|
ignoreBullishMomentumBars,
|
||||||
|
ignoreBearishMomentumBars,
|
||||||
|
//
|
||||||
|
false, // Vision State ...
|
||||||
|
false, // Analyse State ...
|
||||||
|
false // Trigger State ...
|
||||||
|
);
|
||||||
DrawSignal(signal);
|
DrawSignal(signal);
|
||||||
ClearDraws();
|
ClearDraws();
|
||||||
|
|
||||||
@@ -815,75 +868,6 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Detect SL Candidates based on Strategy and Conditions ...
|
|
||||||
*
|
|
||||||
* @param result: Double array reference ...
|
|
||||||
* @param entry: Double, Position Entry Price ...
|
|
||||||
* @param conditions: X121SMCStrategyConditions instance, Provides Configurations ...
|
|
||||||
* @param type: ENUM_X_POSITION_TYPES member, Specified Position Type ...
|
|
||||||
*/
|
|
||||||
void DetectSLCandidates(
|
|
||||||
double &result[],
|
|
||||||
double entry,
|
|
||||||
X121SMCStrategyConditions &conditions,
|
|
||||||
ENUM_X_POSITION_TYPES type //
|
|
||||||
) override
|
|
||||||
{
|
|
||||||
//
|
|
||||||
Clean(result);
|
|
||||||
|
|
||||||
//
|
|
||||||
int cIndex = 1;
|
|
||||||
|
|
||||||
//
|
|
||||||
if (entry <= 0 ||
|
|
||||||
!conditions.IsValid() ||
|
|
||||||
type == X_POSITION_TYPE_ALL ||
|
|
||||||
type == X_POSITION_TYPE_NONE)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.x3vwapConditions.fasts[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.x3vwapConditions.mids[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.x3vwapConditions.slows[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.x3maConditions.fasts[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.xpvConditions.vales[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
Add(
|
|
||||||
conditions.xpvConditions.peaks[cIndex],
|
|
||||||
result //
|
|
||||||
);
|
|
||||||
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customize Strategy Identifier ...
|
* Customize Strategy Identifier ...
|
||||||
*/
|
*/
|
||||||
@@ -1043,7 +1027,13 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
int lastPivotIDX = ArraySize(mOrderFlow) - 1;
|
int lastPivotIDX = ArraySize(mOrderFlow) - 1;
|
||||||
if (IsValidSize(lastPivotIDX))
|
if (IsValidSize(lastPivotIDX))
|
||||||
{
|
{
|
||||||
FillPivotSate(lastPivotIDX);
|
//
|
||||||
|
FillPivotSate(
|
||||||
|
lastPivotIDX,
|
||||||
|
true, // Use Vision State ...
|
||||||
|
true, // Use Analyse State ...
|
||||||
|
false // Use Trigger State ...
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1352,7 +1342,13 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
// Loop Through Order Flow ...
|
// Loop Through Order Flow ...
|
||||||
for (int i = 0; i < orderFlowCount; i++)
|
for (int i = 0; i < orderFlowCount; i++)
|
||||||
{
|
{
|
||||||
FillPivotSate(i);
|
//
|
||||||
|
FillPivotSate(
|
||||||
|
i,
|
||||||
|
true, // Use Vision State ...
|
||||||
|
true, // Use Analyse State ...
|
||||||
|
false // Use Trigger State ...
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1380,7 +1376,10 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
* @param lookupBearishMomentumBars: Boolean ...
|
* @param lookupBearishMomentumBars: Boolean ...
|
||||||
*/
|
*/
|
||||||
void FillPivotSate(
|
void FillPivotSate(
|
||||||
int pivotIDX, //
|
int pivotIDX, //
|
||||||
|
bool useVisionState = true, // Use Vision State ...
|
||||||
|
bool useAnalyseState = true, // Use Analyse State ...
|
||||||
|
bool useTriggerState = true, // Use Trigger State ...
|
||||||
bool lookupSwingHighs = true,
|
bool lookupSwingHighs = true,
|
||||||
bool lookupSwingLows = true,
|
bool lookupSwingLows = true,
|
||||||
bool lookupSupportZones = true,
|
bool lookupSupportZones = true,
|
||||||
@@ -1403,7 +1402,8 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
// Trigger ...
|
// Trigger ...
|
||||||
XPOIState mTriggerState;
|
XPOIState mTriggerState;
|
||||||
if (mTriggerPOIState.HasChild())
|
if (useTriggerState &&
|
||||||
|
mTriggerPOIState.HasChild())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
DetectPivotPOIs(
|
DetectPivotPOIs(
|
||||||
@@ -1436,12 +1436,13 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
// Analyse ...
|
// Analyse ...
|
||||||
XPOIState mAnalyseState;
|
XPOIState mAnalyseState;
|
||||||
if (mAnalysePOIState.HasChild())
|
if (useAnalyseState &&
|
||||||
|
mAnalysePOIState.HasChild())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
DetectPivotPOIs(
|
DetectPivotPOIs(
|
||||||
mOrderFlow[pivotIDX],
|
mOrderFlow[pivotIDX],
|
||||||
mTriggerPOIState,
|
mAnalysePOIState,
|
||||||
mAnalyseState,
|
mAnalyseState,
|
||||||
lookupSwingHighs,
|
lookupSwingHighs,
|
||||||
lookupSwingLows,
|
lookupSwingLows,
|
||||||
@@ -1469,12 +1470,13 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
// Vision ...
|
// Vision ...
|
||||||
XPOIState mVisionState;
|
XPOIState mVisionState;
|
||||||
if (mVisionPOIState.HasChild())
|
if (useVisionState &&
|
||||||
|
mVisionPOIState.HasChild())
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
DetectPivotPOIs(
|
DetectPivotPOIs(
|
||||||
mOrderFlow[pivotIDX],
|
mOrderFlow[pivotIDX],
|
||||||
mTriggerPOIState,
|
mVisionPOIState,
|
||||||
mVisionState,
|
mVisionState,
|
||||||
lookupSwingHighs,
|
lookupSwingHighs,
|
||||||
lookupSwingLows,
|
lookupSwingLows,
|
||||||
@@ -1630,7 +1632,30 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
bool drawOrderFlow = true,
|
bool drawOrderFlow = true,
|
||||||
bool drawOrderFlowState = true,
|
bool drawOrderFlowState = true,
|
||||||
bool drawOnlyLastOrderFlow = false,
|
bool drawOnlyLastOrderFlow = false,
|
||||||
bool drawOnlyLastOrderFlowState = true //
|
bool drawOnlyLastOrderFlowState = true,
|
||||||
|
//
|
||||||
|
ENUM_X_DIRECTION forDir = X_DIRECTION_NONE,
|
||||||
|
//
|
||||||
|
// Ignores List ...
|
||||||
|
bool ignoreSwingHighs = false,
|
||||||
|
bool ignoreSwingLows = false,
|
||||||
|
bool ignoreSupportZones = false,
|
||||||
|
bool ignoreResistanceZones = false,
|
||||||
|
bool ignoreSupplyZones = false,
|
||||||
|
bool ignoreDemandZones = false,
|
||||||
|
bool ignoreBullishOrderBlocks = false,
|
||||||
|
bool ignoreBearishOrderBlocks = false,
|
||||||
|
bool ignoreBullishFairValueGaps = false,
|
||||||
|
bool ignoreBearishFairValueGaps = false,
|
||||||
|
bool ignoreBullishRejectionBars = false,
|
||||||
|
bool ignoreBearishRejectionBars = false,
|
||||||
|
bool ignoreBullishMomentumBars = false,
|
||||||
|
bool ignoreBearishMomentumBars = false,
|
||||||
|
//
|
||||||
|
// States Drawing ...
|
||||||
|
bool drawVisionState = false,
|
||||||
|
bool drawAnalyseState = false,
|
||||||
|
bool drawTriggerState = false //
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -1685,7 +1710,22 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
CustomStateDrawing(
|
CustomStateDrawing(
|
||||||
iPivot.state,
|
iPivot.state,
|
||||||
forceDrawSamePeriod //
|
forceDrawSamePeriod,
|
||||||
|
forDir,
|
||||||
|
ignoreSwingHighs,
|
||||||
|
ignoreSwingLows,
|
||||||
|
ignoreSupportZones,
|
||||||
|
ignoreResistanceZones,
|
||||||
|
ignoreSupplyZones,
|
||||||
|
ignoreDemandZones,
|
||||||
|
ignoreBullishOrderBlocks,
|
||||||
|
ignoreBearishOrderBlocks,
|
||||||
|
ignoreBullishFairValueGaps,
|
||||||
|
ignoreBearishFairValueGaps,
|
||||||
|
ignoreBullishRejectionBars,
|
||||||
|
ignoreBearishRejectionBars,
|
||||||
|
ignoreBullishMomentumBars,
|
||||||
|
ignoreBearishMomentumBars //
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1713,6 +1753,84 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
AddObjectIfNotExists(iObj);
|
AddObjectIfNotExists(iObj);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Vision ...
|
||||||
|
if (drawVisionState)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
CustomStateDrawing(
|
||||||
|
mTriggerPOIState,
|
||||||
|
false,
|
||||||
|
forDir,
|
||||||
|
ignoreSwingHighs,
|
||||||
|
ignoreSwingLows,
|
||||||
|
ignoreSupportZones,
|
||||||
|
ignoreResistanceZones,
|
||||||
|
ignoreSupplyZones,
|
||||||
|
ignoreDemandZones,
|
||||||
|
ignoreBullishOrderBlocks,
|
||||||
|
ignoreBearishOrderBlocks,
|
||||||
|
ignoreBullishFairValueGaps,
|
||||||
|
ignoreBearishFairValueGaps,
|
||||||
|
ignoreBullishRejectionBars,
|
||||||
|
ignoreBearishRejectionBars,
|
||||||
|
ignoreBullishMomentumBars,
|
||||||
|
ignoreBearishMomentumBars //
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Analyse ...
|
||||||
|
if (drawAnalyseState)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
CustomStateDrawing(
|
||||||
|
mAnalysePOIState,
|
||||||
|
false,
|
||||||
|
forDir,
|
||||||
|
ignoreSwingHighs,
|
||||||
|
ignoreSwingLows,
|
||||||
|
ignoreSupportZones,
|
||||||
|
ignoreResistanceZones,
|
||||||
|
ignoreSupplyZones,
|
||||||
|
ignoreDemandZones,
|
||||||
|
ignoreBullishOrderBlocks,
|
||||||
|
ignoreBearishOrderBlocks,
|
||||||
|
ignoreBullishFairValueGaps,
|
||||||
|
ignoreBearishFairValueGaps,
|
||||||
|
ignoreBullishRejectionBars,
|
||||||
|
ignoreBearishRejectionBars,
|
||||||
|
ignoreBullishMomentumBars,
|
||||||
|
ignoreBearishMomentumBars //
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Trigger ...
|
||||||
|
if (drawTriggerState)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
CustomStateDrawing(
|
||||||
|
mVisionPOIState,
|
||||||
|
false,
|
||||||
|
forDir,
|
||||||
|
ignoreSwingHighs,
|
||||||
|
ignoreSwingLows,
|
||||||
|
ignoreSupportZones,
|
||||||
|
ignoreResistanceZones,
|
||||||
|
ignoreSupplyZones,
|
||||||
|
ignoreDemandZones,
|
||||||
|
ignoreBullishOrderBlocks,
|
||||||
|
ignoreBearishOrderBlocks,
|
||||||
|
ignoreBullishFairValueGaps,
|
||||||
|
ignoreBearishFairValueGaps,
|
||||||
|
ignoreBullishRejectionBars,
|
||||||
|
ignoreBearishRejectionBars,
|
||||||
|
ignoreBullishMomentumBars,
|
||||||
|
ignoreBearishMomentumBars //
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1723,7 +1841,24 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
*/
|
*/
|
||||||
void CustomStateDrawing(
|
void CustomStateDrawing(
|
||||||
XPOIState &state,
|
XPOIState &state,
|
||||||
bool forceDrawSamePeriod = false //
|
bool forceDrawSamePeriod = false,
|
||||||
|
ENUM_X_DIRECTION forDir = X_DIRECTION_NONE,
|
||||||
|
//
|
||||||
|
// Ignores List ...
|
||||||
|
bool ignoreSwingHighs = false,
|
||||||
|
bool ignoreSwingLows = false,
|
||||||
|
bool ignoreSupportZones = false,
|
||||||
|
bool ignoreResistanceZones = false,
|
||||||
|
bool ignoreSupplyZones = false,
|
||||||
|
bool ignoreDemandZones = false,
|
||||||
|
bool ignoreBullishOrderBlocks = false,
|
||||||
|
bool ignoreBearishOrderBlocks = false,
|
||||||
|
bool ignoreBullishFairValueGaps = false,
|
||||||
|
bool ignoreBearishFairValueGaps = false,
|
||||||
|
bool ignoreBullishRejectionBars = false,
|
||||||
|
bool ignoreBearishRejectionBars = false,
|
||||||
|
bool ignoreBullishMomentumBars = false,
|
||||||
|
bool ignoreBearishMomentumBars = false //
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -2185,25 +2320,172 @@ class XCX121SMCTestStrategy : public XCX121SMCBaseStrategy
|
|||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool drawSwingHighs = true;
|
||||||
|
bool drawSwingLows = true;
|
||||||
|
bool drawSupportZones = true;
|
||||||
|
bool drawResistanceZones = true;
|
||||||
|
bool drawSupplyZones = true;
|
||||||
|
bool drawDemandZones = true;
|
||||||
|
bool drawBullishOrderBlocks = true;
|
||||||
|
bool drawBearishOrderBlocks = true;
|
||||||
|
bool drawBullishFairValueGaps = true;
|
||||||
|
bool drawBearishFairValueGaps = true;
|
||||||
|
bool drawBullishRejectionBars = true;
|
||||||
|
bool drawBearishRejectionBars = true;
|
||||||
|
bool drawBullishMomentumBars = true;
|
||||||
|
bool drawBearishMomentumBars = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Change Drawing Specs Conditions based on
|
||||||
|
// Provided Direction ...
|
||||||
|
if (forDir == X_DIRECTION_BULLISH)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
drawSwingLows = true;
|
||||||
|
drawDemandZones = true;
|
||||||
|
drawSupportZones = true;
|
||||||
|
drawBullishOrderBlocks = true;
|
||||||
|
drawBullishFairValueGaps = true;
|
||||||
|
drawBullishRejectionBars = true;
|
||||||
|
drawBullishMomentumBars = true;
|
||||||
|
|
||||||
|
//
|
||||||
|
drawSwingHighs = false;
|
||||||
|
drawSupplyZones = false;
|
||||||
|
drawResistanceZones = false;
|
||||||
|
drawBearishOrderBlocks = false;
|
||||||
|
drawBearishFairValueGaps = false;
|
||||||
|
drawBearishRejectionBars = false;
|
||||||
|
drawBearishMomentumBars = false;
|
||||||
|
}
|
||||||
|
else if (forDir == X_DIRECTION_BEARISH)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
drawSwingLows = false;
|
||||||
|
drawDemandZones = false;
|
||||||
|
drawSupportZones = false;
|
||||||
|
drawBullishOrderBlocks = false;
|
||||||
|
drawBullishFairValueGaps = false;
|
||||||
|
drawBullishRejectionBars = false;
|
||||||
|
drawBullishMomentumBars = false;
|
||||||
|
|
||||||
|
//
|
||||||
|
drawSwingHighs = true;
|
||||||
|
drawSupplyZones = true;
|
||||||
|
drawResistanceZones = true;
|
||||||
|
drawBearishOrderBlocks = true;
|
||||||
|
drawBearishFairValueGaps = true;
|
||||||
|
drawBearishRejectionBars = true;
|
||||||
|
drawBearishMomentumBars = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Apply Ignore List ...
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreSwingHighs)
|
||||||
|
{
|
||||||
|
drawSwingHighs = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreSwingLows)
|
||||||
|
{
|
||||||
|
drawSwingLows = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreSupportZones)
|
||||||
|
{
|
||||||
|
drawSupportZones = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreResistanceZones)
|
||||||
|
{
|
||||||
|
drawResistanceZones = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreSupplyZones)
|
||||||
|
{
|
||||||
|
drawSupplyZones = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreDemandZones)
|
||||||
|
{
|
||||||
|
drawDemandZones = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBullishOrderBlocks)
|
||||||
|
{
|
||||||
|
drawBullishOrderBlocks = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBearishOrderBlocks)
|
||||||
|
{
|
||||||
|
drawBearishOrderBlocks = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBullishFairValueGaps)
|
||||||
|
{
|
||||||
|
drawBullishFairValueGaps = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBearishFairValueGaps)
|
||||||
|
{
|
||||||
|
drawBearishFairValueGaps = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBullishRejectionBars)
|
||||||
|
{
|
||||||
|
drawBullishRejectionBars = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBearishRejectionBars)
|
||||||
|
{
|
||||||
|
drawBearishRejectionBars = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBullishMomentumBars)
|
||||||
|
{
|
||||||
|
drawBullishMomentumBars = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
if (ignoreBearishMomentumBars)
|
||||||
|
{
|
||||||
|
drawBearishMomentumBars = false;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
DrawState(
|
DrawState(
|
||||||
tmpState, // State ...
|
tmpState, // State ...
|
||||||
true, // Update To of all Drawings Till now ...
|
true, // Update To of all Drawings Till now ...
|
||||||
true, // Draw SwingHighs ..
|
drawSwingHighs, // Draw SwingHighs ..
|
||||||
true, // Draw SwingLows ..
|
drawSwingLows, // Draw SwingLows ..
|
||||||
false, // Draw SupportZones ..
|
drawSupportZones, // Draw SupportZones ..
|
||||||
false, // Draw ResistanceZones ..
|
drawResistanceZones, // Draw ResistanceZones ..
|
||||||
false, // Draw SupplyZones ..
|
drawSupplyZones, // Draw SupplyZones ..
|
||||||
false, // Draw DemandZones ..
|
drawDemandZones, // Draw DemandZones ..
|
||||||
false, // Draw BullishOrderBlocks ..
|
drawBullishOrderBlocks, // Draw BullishOrderBlocks ..
|
||||||
false, // Draw BearishOrderBlocks ..
|
drawBearishOrderBlocks, // Draw BearishOrderBlocks ..
|
||||||
false, // Draw BullishFairValueGaps ..
|
drawBullishFairValueGaps, // Draw BullishFairValueGaps ..
|
||||||
false, // Draw BearishFairValueGaps ..
|
drawBearishFairValueGaps, // Draw BearishFairValueGaps ..
|
||||||
true, // Draw BullishRejectionBars ..
|
drawBullishRejectionBars, // Draw BullishRejectionBars ..
|
||||||
true, // Draw BearishRejectionBars ..
|
drawBearishRejectionBars, // Draw BearishRejectionBars ..
|
||||||
true, // Draw BullishMomentumBars ..
|
drawBullishMomentumBars, // Draw BullishMomentumBars ..
|
||||||
true, // Draw BearishMomentumBars ..
|
drawBearishMomentumBars, // Draw BearishMomentumBars ..
|
||||||
true // Draw Ticks Zone ...
|
true // Draw Ticks Zone ...
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user