You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
If you want to find your errors quicker you need to be able to see what is going on . . . MT4 doesn't have a proper debugger that you can step through line by line so you have to get creative and add info so you can track it's progress through your code . . how ? well I use Print() statements throughout my code and a Debug level . . .
I have an extern . . .
. . . a bool . . .
bool D1, D2, D3, D4, D5;
Within init() I have this . . .
. . . then I can do things like this . . .
and this . . .
Using the value in the extern I can govern the level of debugging messages . . from no debugging messages in the Experts/Journal tab to flooding it with messages . . .
OK! I have found the reason why the Sell Stop Orders are deleted!@
Ah OK . . . not enough margin, you should test this before you place an order . . .
Thanks a lot for all your help RaptorUK! Much appreciated! I will implement your debugging scheme in future.
Know about checking for availability of funds, but was just lazy I guess to write the code! Will fix that!
Thanks a lot for all your help RaptorUK! Much appreciated! I will implement your debugging scheme in future.
Know about checking for availability of funds, but was just lazy I guess to write the code! Will fix that!
You are most welcome . . . I know about being lazy too :-) I've spent the last 2 months creating some generic functions to replace my "lazy" code . . it had to be done, I'm considering it an investment in my future. Good news is that I'm almost done and will soon be coding the "method" part of my EA.