if (isFisherPattern2 && isFisherPattern1 && swingLow1 < swingLow2)
for (int i = 0; i < 7; i++)
{
// Fisher Transform pattern condition
bool isFisherPattern2 = fisherInd[i] > fisherInd[i + 1] && fisherInd[i + 1] > fisherInd[i + 2]
&& fisherInd[i + 2] < fisherInd[i + 3] && fisherInd[i + 3] < fisherInd[i + 4] && fisherInd[i] < 0;
// Check if the pattern is found
if (isFisherPattern2)
{
swingLow2 = fisherInd[i+2];
}
}
for (int i = 7; i < 25; i++)
{
// Fisher Transform pattern condition
bool isFisherPattern1 = fisherInd[i] > fisherInd[i + 1] && fisherInd[i + 1] > fisherInd[i + 2]
&& fisherInd[i + 2] < fisherInd[i + 3] && fisherInd[i + 3] < fisherInd[i + 4] && fisherInd[i] < 0;
// Check if the pattern is found
if (isFisherPattern1)
{
swingLow1 = fisherInd[i+2];
}
}
if (isFisherPattern2 && isFisherPattern1 && swingLow1 < swingLow2)
{
Print("Time"+ Time[0]);
Print("Bullish divergence");
}

Comment