5 May 2022, 17:17

Hello,

I am using a time filter to close after a certain number of bars. It works most of the time. It never appears to work on the daily chart. I think i discovered why. The reason is gaps in the data. If the data is missing a bar it throws it all off. How can i get the EA to close the trade after a certain number of bars if there are data issues?

Some of these trades go on for many many bars before they get closed when they are supposed to be closed at 5 for example. When i investigate why it appears a bar is missing. Do i need to use a different time filter? I am using the n bars one.

Any help would be appreciated!

Thanks!