Issue with SqAvgVolume Indicator Not Executing Trades in MT5 EA
2 replies
Andreu Kwazema Forne
10 months ago #287521
Hello,
I am creating a strategy in SQx using the volume indicator, and I have not encountered any issues so far. However, when transferring it to MT5, I find that it does not generate any trades.
I receive the following message when compiling the EA:
“property tester_indicator “SqAvgVolume” has been implicitly added during compilation because the indicator is used in iCustom function 0 0″
Several colleagues and I have tested this, and we are all experiencing the same problem. The indicator works correctly when applied directly to a chart in MT5, displaying the expected values, but it does not generate any trades when called within the EA through the iCustom()
function.
We are using MetaTrader 5 and SQx version 139. This issue has occurred in both our local tests and in different environments, so we believe it is not due to an installation or configuration error.
Other custom indicators work correctly when called from the EA. We are only experiencing this problem with SqAvgVolume
. Additionally, we have verified that the .ex5
file for the indicator is in the correct folder (MQL5/Indicators
) and is properly compiled without errors.
We would appreciate any guidance on why this indicator seems not to work within the EA, despite no visible errors.
Thanks so much!

tomas262
10 months ago #287561
Hi, I have test a simple strategy Avg Volume[1] > 5000 AND Avg Volume[2] < 5000 on AUDCAD H1 and it works, in last month it made 2 trades
Andreu Kwazema Forne
10 months ago #287580
Hi Tomás,
Thank you for your response. I’ve been reviewing the details of my strategy and have run several tests to identify the problem.
I’m sending you several screenshots to better illustrate the issue I’m having with the Volume
parameter.
- Example 1 and Example 2: In these images, you can see that the strategy is running correctly in SQx. I’m using the following block:
SQx Block:
- Condition 1:
AvgVolume(14)[1] < Volume[1]
- Condition 2:
AvgVolume(14)[3] > Volume[3]
This block checks if the average volume over two different periods is less than or greater than the corresponding volume. You can also see that the code appears to be configured correctly and shouldn’t be causing any issues.
- Condition 1:
- Example 3: Here you can see the message I receive during compilation. It doesn’t seem to be a critical error but rather an informational message:
"property tester_indicator "SqAvgVolume" has been implicitly added during compilation because the indicator is used in iCustom function"
. While it looks normal, I wanted to confirm with you. - Example 4 and Example 5: In these images, I ran a simple test and, as you can see, the strategy doesn’t generate any trades. To investigate further, I added some
printf
lines to check the data returned byAvgVolume
andVolume
. - Example 7 and Example 8: In these images, you can see that I added several debug lines using
printf
. In the results (Example 8), you can observe thatAvgVolume
returns values correctly, butVolume
consistently returns 0, which should not be the case.——-
Could it be that I’m using
Volume
incorrectly? My objective is to open a trade if the volume of the last candle is greater than the average, for example,Volume(1) > AVolume(period 14)(1)
.This way, I could know when the volume has exceeded the average.”
——-
Is there any specific configuration in SQx or MT5 that could be affecting how
Volume
returns data when used in an EA?Thanks so much!
Viewing 2 replies - 1 through 2 (of 2 total)