Issue to fix please in mq5

 
Hello i am coding indicator for mt5 
And 
1.after i launch it the buffers draws out of their values that i didnt load in code this is the first question
2.when i call time value in oncalcuulate indicator freez dont respod to other duals like onchert events or ontimer..etc 
3.when i run this function it is function that make claculates on time it also freeze why
Here is photos attached thank you all for help
 
  1. Don't post pictures of code, they are generally too hard to read.

    Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
          General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
              Messages Editor
          Forum rules and recommendations - General - MQL5 programming forum (2023)

  2. Abdullah Alrai:
    1.after i launch it the buffers draws out of their values that i didnt load in code this is the first question
    2.when i call time value in oncalcuulate indicator freez dont respod to other duals like onchert events or ontimer..etc 
    3.when i run this function it is function that make claculates on time it also freeze why

    Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

    Always post all relevant code (using Code button) or attach the source file.

  3. See How to do your lookbacks correctly #9#14 & #19. (2016)

 
William Roeder #:
  1. Don't post pictures of code, they are generally too hard to read.

    Please edit your (original) post and use the CODE button (or Alt+S)! (For large amounts of code, attach it.)
          General rules and best pratices of the Forum. - General - MQL5 programming forum #25 (2019)
              Messages Editor
          Forum rules and recommendations - General - MQL5 programming forum (2023)

  2. Do you really expect an answer? There are no mind readers here and our crystal balls are cracked, so we can't see your machine.
         How To Ask Questions The Smart Way. (2004)
              Be precise and informative about your problem

    We can't see your broken code.

    Always post all relevant code (using Code button) or attach the source file.

  3. See How to do your lookbacks correctly #9#14 & #19. (2016)

Code is 19 k lines .... How to put is here! 
 
Abdullah Alrai #:
Code is 19 k lines .... How to put is here! 

Locate the problem, write a little code that reproduces it, and attach that little code here.

If you attach 19k lines of code, I bet no one will want to waste time looking at it.

 
Vladislav Boyko #:

Locate the problem, write a little code that reproduces it, and attach that little code here.

If you attach 19k lines of code, I bet no one will want to waste time looking at it.

Hhhh 100 % right because of that i put photos and descripe what happening

 
Vladislav Boyko #:
Locate the problem, write a little code that reproduces it, and attach that little code here.

This is the only way to get help. Unlike your current attempt to attract psychics (which will never succeed), the only way that works requires your effort.

P.S. I find the following ridiculously naive:

Not only did you not provide code to reproduce the problem, but you also blacked out the function identifier. Do you really think that you have a chance of meeting a psychic?

 
Abdullah Alrai #:
Hhhh 100 % right because of that i put photos and descripe what happening

  1. create a new indicator;
  2. declare buffers in it;
  3. gradually add the code (or its equivalent) from the main indicator until the problem you described appears;
  4. after the problem has appeared, review the code again and remove as much as possible everything that is not needed to reproduce the problem;
  5. attach a short, concise code here, the launch of which will allow other users to see the problem
 
Vladislav Boyko #:
attach a short, concise code here, the launch of which will allow other users to see the problem

The shorter and simpler the code you create to reproduce the problem, the better chance you have of someone here taking the time to look at it and try to reproduce the problem.

There is no other way.

But I’m willing to bet that if you start doing it the way I wrote in the post above, you won’t post anything here. Because in the process of localizing the problem, you will find it yourself.

 
Vladislav Boyko #:

The shorter and simpler the code you create to reproduce the problem, the better chance you have of someone here taking the time to look at it and try to reproduce the problem.

There is no other way.

But I’m willing to bet that if you start doing it the way I wrote in the post above, you won’t post anything here. Because in the process of localizing the problem, you will find it yourself.

Thank you mr vladislav for your advices but realy here is the problem 
It is normal function that doing normal mthematic calculates when i run it by onchart event it will work normaly 
When i call it in on calculate all of the indicator freezing ...!!!!! Did that happen with you before
And for buffers drawing how they take their values they are drawn with our custom values every time appearing by a shape 
 
Abdullah Alrai #:
Thank you mr vladislav for your advices but realy here is the problem 
It is normal function that doing normal mthematic calculates when i run it by onchart event it will work normaly 
When i call it in on calculate all of the indicator freezing ...!!!!! Did that happen with you before
And for buffers drawing how they take their values they are drawn with our custom values every time appearing by a shape 
Unless you provide some code to reproduce the problem nobody can help

If it helps I can say it is a problem with your code because it will be


 
Abdullah Alrai #:

When i call it in on calculate all of the indicator freezing ...!!!!! Did that happen with you before

This could be down to too much processing, too much loops running, maybe unneeded processing on historic data? Depends what the indicator should do, many indicators are only needed to reveal current market dynamics and trends