last works on XCZone test EA ...

This commit is contained in:
2025-05-21 00:29:33 +03:30
parent 70876676f5
commit 3e29a557bf
3 changed files with 150 additions and 8 deletions
+16 -2
View File
@@ -169,7 +169,8 @@ string ToString(ENUM_X_CHART_IDS value)
bool ToSignal(
XBoxZone &box,
XSignal &signal,
double &rewardRatios[] //
double &rewardRatios[],
double additionalSL = 0 //
)
{
//
@@ -188,10 +189,15 @@ bool ToSignal(
//
XOHCL entryBar;
int entryIDX = box.ToIndex();
if (entryIDX > 0)
{
entryIDX--;
}
result = entryBar.Init(
box.symbol,
box.period,
box.ToIndex() - 1 //
entryIDX //
);
if (!result)
{
@@ -231,6 +237,14 @@ bool ToSignal(
isBullish
? box.lower
: box.upper;
if (additionalSL > 0)
{
//
sl =
isBullish
? sl - additionalSL
: sl + additionalSL;
}
//
double risk = MathAbs(entry - sl);