Error in copying data from MACD buffer: 4806 - page 2

 
Blu3ry #:
Hey thanks for your input on the issue here. I did find another article here https://www.mql5.com/en/forum/322393 and this after i made the suggested changes and i no longer get the error code. So i finally get no error from my journal when using the strategy tester. However, the strategy tester is not entering any trades now. So im gonna have to review my entry conditions and see whats blocking the trades. Gonna post the current code of how i have things structured now.
oh never mind with that the issue was the macd data for entry condition. was way to high for the pair im testing on. The 0.0080 section in the code had to be changed to 0.0000(wanted number for code) for market condition to meet and pass that level.
   // Buy Conditions
    if (currentAsk > currentOpen && ema6 > ma6 && macdHistogram > 0.0080) {
        return 1; // Buy Signal
    }
    // Sell Conditions
    else if (currentBid < currentOpen && ema6 < ma6 && macdHistogram < -0.0080) {
        return -1; // Sell Signal
    }

    return 0; // No Signal
}