Indicators in Strategy Tester not showing in different time frames

 

Hi,  just got started using MQL5 and wanted to test some indicators in an EA.

When I tried testing it using the "minute" time frames (1min, 5min, 30min), the indicator appears on the chart as the backtest runs.

However, when I shift it to the "hourly" or "daily" time frames, the strategy tester does not seem to display them at all, not even on the Data Window. Have attached screenshots below.


1) Does this mean the EA is not using any indicators?

2) I did not change anything in the code, why does it affect certain time frames?

3) There is also some red and grey lines outlining the prices only half-way, what are these? (Seen in "withoutIndicator_1H.jpg")

 
boomgod92:

Hi,  just got started using MQL5 and wanted to test some indicators in an EA.

When I tried testing it using the "minute" time frames (1min, 5min, 30min), the indicator appears on the chart as the backtest runs.

However, when I shift it to the "hourly" or "daily" time frames, the strategy tester does not seem to display them at all, not even on the Data Window. Have attached screenshots below.


1) Does this mean the EA is not using any indicators?

2) I did not change anything in the code, why does it affect certain time frames?

3) There is also some red and grey lines outlining the prices only half-way, what are these? (Seen in "withoutIndicator_1H.jpg")

Hi,

does the indicator produce any errors in the experts tab ? 

 
No there were no errors, it starts off with "Initialization completed" and proceeds like any other back test just that I don''t see any indicators in the data window or the chart so I have no clue if the trades are based on the indicators or not.
 
boomgod92:

Hi,  just got started using MQL5 and wanted to test some indicators in an EA.

When I tried testing it using the "minute" time frames (1min, 5min, 30min), the indicator appears on the chart as the backtest runs.

However, when I shift it to the "hourly" or "daily" time frames, the strategy tester does not seem to display them at all, not even on the Data Window. Have attached screenshots below.


1) Does this mean the EA is not using any indicators?

2) I did not change anything in the code, why does it affect certain time frames?

3) There is also some red and grey lines outlining the prices only half-way, what are these? (Seen in "withoutIndicator_1H.jpg")

Check your handles and print to the log in case of error.
boomgod92:
No there were no errors, it starts off with "Initialization completed" and proceeds like any other back test just that I don''t see any indicators in the data window or the chart so I have no clue if the trades are based on the indicators or not.
And attach the log here.
 

I printed out the handler codes and any errors, attached is the log file.

the "*******0" in the log was printing the GetLastError() which returned 0, the rest are the return codes of the individual indicator handlers.

Ignore the trades it is making, it is because of my algorithm that it does not really work on 1H time frame.

Files:
Log.jpg  313 kb
 
boomgod92:

Hi,  just got started using MQL5 and wanted to test some indicators in an EA.

When I tried testing it using the "minute" time frames (1min, 5min, 30min), the indicator appears on the chart as the backtest runs.

However, when I shift it to the "hourly" or "daily" time frames, the strategy tester does not seem to display them at all, not even on the Data Window. Have attached screenshots below.


1) Does this mean the EA is not using any indicators?

2) I did not change anything in the code, why does it affect certain time frames?

3) There is also some red and grey lines outlining the prices only half-way, what are these? (Seen in "withoutIndicator_1H.jpg")

Could it be that your database of historical prices does not go far enough back in time to be able to calculate your indicator for the longer time frames?
 
I did try other durations, 1 month, 3 month and 6 months but the results were still the same.
 

Try this:

When you attach the indicator to strategy tester-> click allow DLL imports

Also check in the indicators' code if ex the variables using specific period ex PERIOD_H1 instead of 0 or _Period

 
I've also been having the same issue. At least with the red and grey lines. I think it might just be a corrupt file.
 
As you can see in the screenshots, I commented everything out in the source code leaving only the main functions... and these lines still appear.
Files:
mq5pic.JPG  70 kb
Reason: