Apply XCHICHWap EURUSDb Level 1 Fix ...

This commit is contained in:
2024-09-30 22:37:48 +03:30
parent af802243f9
commit 8c17528584
15 changed files with 129378 additions and 13 deletions
+28
View File
@@ -0,0 +1,28 @@
//
// Check At Least 5 Candle Which is Passed Distance ...
bool isPriceBreakeDistance = true;
for (int ci = 1; ci < 6; ci++) {
//
XOHCL iBar;
isPriceBreakeDistance = iBar.Init(
position.symbol,
position.period,
ci //
);
if (!isPriceBreakeDistance) {
break;
}
//
double selectedPrice =
isLong
? MathMin(iBar.close, iBar.low)
: MathMax(iBar.close, iBar.high);
double iDrawdownInPoint = MathAbs(position.entry - selectedPrice);
//
isPriceBreakeDistance = MathAbs(iDrawdownInPoint) > MathAbs(protectDistance);
if (!isPriceBreakeDistance) {
break;
}
}