How to debug?

 

This is probably a dumb question, but I can't seem to find the answer. How exactly do you debug an expert advisor? I just wrote one based on my own system, but it's going to need extensive debugging and I don't know where to start. I feel like I'm in way over my head.

 

You could have many problems. Impossible for anyone to help without seeing the source code. Does it even compile? If it does compile that still doesn't mean it will execute the way you want it too. You would have to show the source code for anybody to have a chance of helping you.

 
fuzzbomb:
This is probably a dumb question, but I can't seem to find the answer. How exactly do you debug an expert advisor? I just wrote one based on my own system, but it's going to need extensive debugging and I don't know where to start. I feel like I'm in way over my head.

Metatrader is equipped with an extensive suite of debugging tools...... - well, not really!

You are stuck with trying to figure things out with just the 'Print' and 'Comment' commands - so it could take some time

 

Remember, all the Print()'s get written to the experts/logs/ log file, this can be useful sometimes.

 

Ok, I've got it figured out for the most part. Has anyone figured out what the breakpoints in MetaEditor do?

 
fuzzbomb:
Ok, I've got it figured out for the most part. Has anyone figured out what the breakpoints in MetaEditor do?

Unfortunately they are there just to tease!

And will remain this way until Metaquotes develop include some proper debugging tools - which is extremely unlikely as their 'Clients' are the Brokerage houses (read trading desks), not us, who trade against us and have no wish to see 'us' developing more profitable EA's.

Sad but true...

Reason: