Soft time limit 150 ms exceeded

 

Hello, 

Does anybody know how to resolve a " Soft time limit 150 ms exceeded.". I have an MT4 Zuluscript operating and it keeps freesing after a few days giving this error message. I got this feedback from Zulutrade but not sure how to optimise the script for better performance.

Thats just a warning that script is slow in execution , if hard limits are exceeded script will stop. User should check on how to optimize the script for better performance if hard limits are exceeded.
 

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

 
William Roeder #:

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked. Always post all relevant code (using Code button) or attach the source file.
     How To Ask Questions The Smart Way. (2004)
          Be precise and informative about your problem

We can't see your broken code.

When I compile the script, even though it compiles succesfully, I get the following warning messages.


2022-09-02 11:15:31  success Compile done!
 warning Function parameter 2 might result in data loss.
44 : 16
 warning Function parameter 2 might result in data loss.
45 : 16
 warning Function parameter 2 might result in data loss.
46 : 16
 warning Function parameter 2 might result in data loss.
47 : 16
 warning Assignment could result in data loss.
54 : 9
 warning Assignment could result in data loss.
55 : 9




These warnings appear for the following lines 
The first four warnings:
44        H90VAL=iHigh(NULL,PERIOD_H1, H90BAR);
45        L90VAL=iLow(NULL,PERIOD_H1, L90BAR);
46        H45VAL=iHigh(NULL,PERIOD_H1, H45BAR);
47        L45VAL=iLow(NULL,PERIOD_H1, L45BAR);

the last two warnings:
54        POSNLONG = MathRound(AccountEquity()* EURFXRate/100*0.0066/ HILORANGELONG/LotMultiplier);
55        POSNSHORT = MathRound(AccountEquity()* EURFXRate/100*0.0066/ HILORANGESHORT/LotMultiplier);


The variables are defined as follows:

    double H90VAL = 0.0;

    double L90VAL = 0.0;

    double H45VAL = 0.0;

    double L45VAL = 0.0;

int POSNLONG = 0; 

int POSNSHORT = 0; 


I believe these warnings might be the culprits that stop the script from running giving a sotft time limit exceeded error

Can anyone assist how to resolve this?
 
Aceof Ace #: Can anyone assist how to resolve this?
  1. What part of “Always post all relevant code” was unclear?

    H90VAL=iHigh(NULL,PERIOD_H1, H90BAR);

    You already know the warning is the H90BAR, but you haven't shown the datatype (must be int).

  2. POSNLONG = MathRound(AccountEquity()* EURFXRate/100*0.0066/ HILORANGELONG/LotMultiplier);

    You have intVariable = double Value thus warning. What don't you understand?

Reason: