last ...
This commit is contained in:
@@ -919,3 +919,194 @@ if (has)
|
||||
{
|
||||
draws.Add(iHighTrend);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// if (HasDirection(marketStructure.signalKeyBarPatternDir))
|
||||
// {
|
||||
// Print("Detected ...");
|
||||
// }
|
||||
// if (marketStructure.ob.IsValid() && marketStructure.fvg.IsValid())
|
||||
// {
|
||||
// Print("Detected ...");
|
||||
// }
|
||||
// if (marketStructure.support.IsValid() || marketStructure.resistance.IsValid())
|
||||
// {
|
||||
// //
|
||||
// XOHCL pBar;
|
||||
// XOHCL p2Bar;
|
||||
// bool has = cBar.GetPreviousBar(pBar);
|
||||
// has = has &&
|
||||
// pBar.GetPreviousBar(p2Bar);
|
||||
// if (!has)
|
||||
// {
|
||||
// //
|
||||
// pBar.Clean();
|
||||
// p2Bar.Clean();
|
||||
// return;
|
||||
// }
|
||||
|
||||
// //
|
||||
// // Check For PrevZoneExistanse ...
|
||||
// has = marketStructure.prevZone.IsValid();
|
||||
// if (has) {
|
||||
// //
|
||||
// // Draw Prev Zone ...
|
||||
// XCBoxObject *iPrevZoneObj;
|
||||
// marketStructure.prevZone.to = pBar.time;
|
||||
// has = fima2Signaller.poiDrawer.DrawBox(
|
||||
// marketStructure.prevZone,
|
||||
// iPrevZoneObj //
|
||||
// );
|
||||
// if (has)
|
||||
// {
|
||||
// //
|
||||
// XPOIStyle style;
|
||||
// fima2Signaller.poiDrawer.GetBoxStyle(
|
||||
// style,
|
||||
// marketStructure.prevZone.dir //
|
||||
// );
|
||||
// style.clr = clrYellow;
|
||||
// fima2Signaller.poiDrawer.ApplyBoxStyle(
|
||||
// iPrevZoneObj,
|
||||
// style //
|
||||
// );
|
||||
|
||||
// //
|
||||
// style.Clean();
|
||||
// eaDraws.Add(iPrevZoneObj);
|
||||
// }
|
||||
// }
|
||||
|
||||
// //
|
||||
// if (has)
|
||||
// {
|
||||
// Print("Detected ...");
|
||||
// }
|
||||
|
||||
// //
|
||||
// // Cleanup Resources ...
|
||||
// pBar.Clean();
|
||||
// p2Bar.Clean();
|
||||
// }
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
bool has = cBar.GetPreviousBar(pBar);
|
||||
if (marketStructure.isPTest)
|
||||
{
|
||||
//
|
||||
// Check For PrevZoneExistanse ...
|
||||
has = marketStructure.pTestedZone.IsValid();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Draw Prev Zone ...
|
||||
XCBoxObject *iPrevZoneObj;
|
||||
marketStructure.pTestedZone.to = pBar.time;
|
||||
has = fima2Signaller.poiDrawer.DrawBox(
|
||||
marketStructure.pTestedZone,
|
||||
iPrevZoneObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
XPOIStyle style;
|
||||
fima2Signaller.poiDrawer.GetBoxStyle(
|
||||
style,
|
||||
marketStructure.pTestedZone.dir //
|
||||
);
|
||||
style.clr = clrYellow;
|
||||
fima2Signaller.poiDrawer.ApplyBoxStyle(
|
||||
iPrevZoneObj,
|
||||
style //
|
||||
);
|
||||
|
||||
//
|
||||
style.Clean();
|
||||
eaDraws.Add(iPrevZoneObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
Print("Previous Tested ...");
|
||||
}
|
||||
pBar.Clean();
|
||||
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
//
|
||||
// Previous Bar must Has Support or Resistance ...
|
||||
|
||||
//
|
||||
// Check Supports ...
|
||||
idx = GetYoungestBefore(
|
||||
pForBar.time,
|
||||
supports //
|
||||
);
|
||||
has =
|
||||
pForBar.IsValid() &&
|
||||
IsValidIndex(idx);
|
||||
if (has)
|
||||
{
|
||||
pSupport = supports[idx];
|
||||
}
|
||||
|
||||
//
|
||||
// Check Resistances ...
|
||||
idx = GetYoungestBefore(
|
||||
pForBar.time,
|
||||
resistances //
|
||||
);
|
||||
has =
|
||||
pForBar.IsValid() &&
|
||||
IsValidIndex(idx);
|
||||
if (has)
|
||||
{
|
||||
pResistance = resistances[idx];
|
||||
}
|
||||
|
||||
//
|
||||
bool isPSupportTouched =
|
||||
pSupport.IsValid() &&
|
||||
pForBar.low < pSupport.upper;
|
||||
|
||||
//
|
||||
bool isPResistanceTouched =
|
||||
pResistance.IsValid() &&
|
||||
pForBar.high > pResistance.lower;
|
||||
|
||||
//
|
||||
has =
|
||||
isPSupportTouched ||
|
||||
isPResistanceTouched;
|
||||
structure.isPTest = has;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
if (isPSupportTouched)
|
||||
{
|
||||
//
|
||||
// Validate Previously Tested Zone Price ...
|
||||
structure.pTestedZone = pSupport;
|
||||
}
|
||||
else if (isPResistanceTouched)
|
||||
{
|
||||
//
|
||||
// Validate Previously Tested Zone Price ...
|
||||
structure.pTestedZone = pResistance;
|
||||
}
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user