![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Check the return value of OrderSend()
Have you gone through your code with the debugger?
Well Id never done that before. I clicked the debugger in MetaEditor and nothing happened.
Gotta be a way to fix this problem.
Your code is opening orders (although Marco is correct - you should check the return value in case of failure, and Carl is correct you shouldn't use NULL that way) and the logic is working as you have asked - see my post here.
I guess you're after something more like this:
Well Id never done that before. I clicked the debugger in MetaEditor and nothing happened.
Gotta be a way to fix this problem.
If the green button in the editor to start the debugger is grey (not available) just do this:
If I try to debug an indicator with b1045 or b1052 it isn't working.
If so I can send you the old terminal b1031 but without any guaranty - you might have to delete the content of the config folder!
Don't forget to place Breakpoints (F9) to stop the debugger at specific lines!
Thanks all !! Got it down finally. Was a logic issue.
Second counter and magic numbers did it