It's NOT the code, To execute the code you need the 'History'' which is not build correctly. I have the same error with experts which did run on this machine - and still do run on another machine - using the SAME broker and account. It MUST BE anything with Metatrader or the tester.
If you read the answer of the OP, you will see it WAS a code issue, trying to access an inexistant timeframe data. And it happened randomly due to an uninitialized variable.
Sorry, but your 2 posts are useless as they don't provide any technical details about the issue. Check your code.
It's NOT the code, To execute the code you need the 'History'' which is not build correctly. I have the same error with experts which did run on this machine - and still do run on another machine - using the SAME broker and account. It MUST BE anything with Metatrader or the tester.
If you read the answer of the OP, you will see it WAS a code issue, trying to access an inexistant timeframe data. And it happened randomly due to an uninitialized variable.
Sorry, but your 2 posts are useless as they don't provide any technical details about the issue. Check your code.