EA wont work because "OnInt Failed"

 

I just started learning code, and finally the MetaTrader Editor confirmed I had no Errors or Warnings in my code, but when I tested EA on mt5......it refused!

It just said that the OnInt Failed......I dont even know whats wrong becasue the MetaTrader Editor confirmed no errors, so I cant even get hints on where the problem is,

Anyone understand the meaning of this "OnInt Failed"??

 
NatashaSibanda:

I just started learning code, and finally the MetaTrader Editor confirmed I had no Errors or Warnings in my code, but when I tested EA on mt5......it refused!

It just said that the OnInt Failed......I dont even know whats wrong becasue the MetaTrader Editor confirmed no errors, so I cant even get hints on where the problem is,

Anyone understand the meaning of this "OnInt Failed"??

Check your journal, as 99 times out of 100 it will say an error number.

But just because the compiler shows no errors, you still have to debug the code. eg by clicking the blue play button on the toolbar near the top, it runs tests to find other possible issues that are often not reported or detected by the compiler, such as loops or 0 devisor errors.

 
Revo Trades #:

Check your journal, as 99 times out of 100 it will say an error number.

But just because the compiler shows no errors, you still have to debug the code. eg by clicking the blue play button on the toolbar near the top, it runs tests to find other possible issues that are often not reported or detected by the compiler, such as loops or 0 devisor errors.

Thnkx for replying, I clicked that debugging button and it said "Invalid Pointer Access", any idea what that means? 

Files:
errorrrr.png  58 kb
 
NatashaSibanda #:
any idea what that means? 

Sure - https://www.mql5.com/en/search#!keyword=Invalid%20Pointer%20Access

 
NatashaSibanda: It just said that the OnInt Failed......I dont even know whats wrong

Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
          Code debugging - Developing programs - MetaEditor Help
          Error Handling and Logging in MQL5 - MQL5 Articles (2015)
          Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
          Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)

 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
William Roeder #:

Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
          Code debugging - Developing programs - MetaEditor Help
          Error Handling and Logging in MQL5 - MQL5 Articles (2015)
          Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
          Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)

Am new to coding, thats why I was askin
 
NatashaSibanda #:
Am new to coding, thats why I was askin

I recommend that you read much of williams links he has in his post. And show in your next post proof that you have learnt something otherwise you may not get further assistance as coders rarely get help in this forum unless they show proof that they have done some homework and searching at least this site for answers before asking questions.

 
Ayt, I'll check it out thnkx!