last ...
This commit is contained in:
@@ -3471,6 +3471,9 @@ class XC121SMCTradeHandler : public XCBaseAlert
|
|||||||
//
|
//
|
||||||
string prefix = "Protector: ";
|
string prefix = "Protector: ";
|
||||||
|
|
||||||
|
//
|
||||||
|
int targetDistance = 5;
|
||||||
|
|
||||||
//
|
//
|
||||||
// Implement Protection Senario Here ...
|
// Implement Protection Senario Here ...
|
||||||
int count = Count();
|
int count = Count();
|
||||||
@@ -3758,8 +3761,8 @@ class XC121SMCTradeHandler : public XCBaseAlert
|
|||||||
|
|
||||||
//
|
//
|
||||||
double targetDelta = isLong
|
double targetDelta = isLong
|
||||||
? target + (15 * points)
|
? target + (targetDistance * points)
|
||||||
: target - (15 * points);
|
: target - (targetDistance * points);
|
||||||
bool canRF =
|
bool canRF =
|
||||||
target > 0 &&
|
target > 0 &&
|
||||||
(isLong ? target > entry
|
(isLong ? target > entry
|
||||||
|
|||||||
@@ -776,6 +776,114 @@ struct X121SMCStrategyXWZWorkingZone
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// Checking Other Senario for Waiting Boxes ...
|
||||||
|
if (obStateEvents.hasNewSharp)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XBoxZone currSharp;
|
||||||
|
XBoxZone prevSharp;
|
||||||
|
|
||||||
|
//
|
||||||
|
// Retrieve Current Sharp ...
|
||||||
|
XCPOIDrawer *drawer = provider.visionCycleHelper.mPOIDrawer;
|
||||||
|
XBoxZone tmpBoxes[];
|
||||||
|
Copy(
|
||||||
|
obState.sharps,
|
||||||
|
tmpBoxes //
|
||||||
|
);
|
||||||
|
idx = GetYoungest(tmpBoxes);
|
||||||
|
has = IsValidIndex(idx);
|
||||||
|
if (has)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
currSharp = tmpBoxes[idx];
|
||||||
|
bool isBullish = currSharp.IsBullish();
|
||||||
|
|
||||||
|
//
|
||||||
|
ArrayRemove(
|
||||||
|
tmpBoxes,
|
||||||
|
idx,
|
||||||
|
1 //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
while (HasChild(tmpBoxes))
|
||||||
|
{
|
||||||
|
//
|
||||||
|
idx = GetYoungest(tmpBoxes);
|
||||||
|
has = IsValidIndex(idx);
|
||||||
|
|
||||||
|
//
|
||||||
|
if (!has)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
XBoxZone iBox = tmpBoxes[idx];
|
||||||
|
ArrayRemove(
|
||||||
|
tmpBoxes,
|
||||||
|
idx,
|
||||||
|
1 //
|
||||||
|
);
|
||||||
|
|
||||||
|
//
|
||||||
|
if (iBox.dir == currSharp.dir)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
prevSharp = iBox;
|
||||||
|
iBox.Clean();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
iBox.Clean();
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
Clean(tmpBoxes);
|
||||||
|
}
|
||||||
|
Clean(tmpBoxes);
|
||||||
|
|
||||||
|
//
|
||||||
|
has = currSharp.IsValid() &&
|
||||||
|
prevSharp.IsValid();
|
||||||
|
if (has)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
XCBoxObject *iCurrObj;
|
||||||
|
XCBoxObject *iPrevObj;
|
||||||
|
has = drawer.DrawBox(
|
||||||
|
currSharp,
|
||||||
|
iCurrObj //
|
||||||
|
);
|
||||||
|
has =
|
||||||
|
has &&
|
||||||
|
drawer.DrawBox(
|
||||||
|
prevSharp,
|
||||||
|
iPrevObj //
|
||||||
|
);
|
||||||
|
if (has)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
Print("Sharp Detection ...");
|
||||||
|
|
||||||
|
//
|
||||||
|
iCurrObj.Delete();
|
||||||
|
iPrevObj.Delete();
|
||||||
|
|
||||||
|
//
|
||||||
|
iCurrObj.Detach();
|
||||||
|
iPrevObj.Detach();
|
||||||
|
|
||||||
|
//
|
||||||
|
ZeroMemory(iCurrObj);
|
||||||
|
ZeroMemory(iPrevObj);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
count = CountWaitingBoxes();
|
count = CountWaitingBoxes();
|
||||||
result = IsValidSize(count);
|
result = IsValidSize(count);
|
||||||
|
|||||||
Reference in New Issue
Block a user