My EA has not worked in a while and it works again when I compile code or when I restart the metatrader4 terminal. Why does it have to be like that? Can someone explain it?

Ricky Romadona Tri Saputra
368
Ricky Romadona Tri Saputra  

There was no problem with my EA, everything was going well until I discovered these facts.

First I assume it's a technical problem with hardware, signal stability or maybe my broker.

but some of these conditions I have dig deeper and found that it is in Metatrader 4.

Is it really like that? can any of you provide me with a solution or explanation?




My EA has not worked in a while and it works again when I compile code or when I restart the metatrader4 terminal.

Why does it have to be like that? Can someone explain it?

thx friend

Ricky Romadona Tri Saputra
368
Ricky Romadona Tri Saputra  
Teboho Rakotsoane:

This happened to me too with a Custom Indicator though, but after some time for some odd reason it went back to normal state. I think MT4 has bugs or its a way of being pushed to use MT5 platform.

I hope we find an explanation in this discussion, maybe some friends know how to solve it.

this will be very detrimental if the EA at a small time frame, especially if we leave it with vps.


thank you for the response, Teboho...

William Roeder
23729
William Roeder  
  1. Teboho Rakotsoane: I think MT4 has bugs 

    How To Ask Questions The Smart Way. 2004
              Don't rush to claim that you have found a bug.
    Questions Not To Ask
              My program doesn't work. I think system facility X is broken.

  2. Ricky Romadona Tri Saputra: but some of these conditions I have dig deeper and found that it is in Metatrader 4.

    Prove it. Show us working code that displays the problem.

  3. Ricky Romadona Tri Saputra: Why does it have to be like that? Can someone explain it?

    With the information you've provided — we can only guess. And you haven't provided any useful information for that.

    I'd guess you have a zero divide.

  4. Look in the logs and find out what's wrong with your code.
Ricky Romadona Tri Saputra
368
Ricky Romadona Tri Saputra  
William Roeder:
  1. How To Ask Questions The Smart Way. 2004
              Don't rush to claim that you have found a bug.
    Questions Not To Ask
              My program doesn't work. I think system facility X is broken.

  2. Prove it. Show us working code that displays the problem.

  3. With the information you've provided — we can only guess. And you haven't provided any useful information for that.

    I'd guess you have a zero divide.

  4. Look in the logs and find out what's wrong with your code.

hi william

First I thank you for your suggestion, I'll take a closer look at the code I use and have a deeper look when EA is run.


but to explain the problem in detail like your request, it seems I need to make a video. because it's not just a code problem.


so now, for example:

conditions:

"EA will do stop loss when the trend reverses. in indicator calculation"


as an example of what happened today:

1. conditions are in a buy trend, EA is buying. and the trend has a reversal after seeing the indicators / conditions that are expected for the trend to reverse.


2. EA did not perform the stop loss command. so suffer more losses.


3. After restarting the MT4 terminal or compiling the code on the MetaEditor, stop loss occurs.


so I am looking for a solution to this condition, is there a way to solve it.

the solution I could think of at the moment is to prioritize metatrader4 in "Task Manager computer / vps", but this will probably only reduce the impact.


Thank you William, this makes me more motivated to be better.

William Roeder
23729
William Roeder  
Ricky Romadona Tri Saputra: so I am looking for a solution to this condition, is there a way to solve it.

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

Always post all relevant code.
     How To Ask Questions The Smart Way. 2004
          Be precise and informative about your problem

We can't see your broken code.

Fix your broken code.

With the information you've provided — we can only guess. And you haven't provided any useful information for that.