Need help to fix a source code!!!

 

Hello guys!!!

I found an indicator here on the fórum that return several errors when I try to compile it and I have no clue how to fix those errors.

On the same page, seems that was the file compiled already, but this one seems to have errors on the alert generation. The arrows itself change when I change the settings, but the alerts are generated Always and only as standard values.

If I try to use it on manual trading it should not be a problem. But running automatated, it's cause a big problem because generate an alert and trading where should not.


Can anyone help me here?

<ex4 file deleted>

Files:
TMAzCG.mq4  8 kb
 
This file is corrupted.
Find it on Google and download the correct one.
 
leoguisanchez:

Hello guys!!!

I found an indicator here on the fórum that return several errors when I try to compile it and I have no clue how to fix those errors.

On the same page, seems that was the file compiled already, but this one seems to have errors on the alert generation. The arrows itself change when I change the settings, but the alerts are generated Always and only as standard values.

If I try to use it on manual trading it should not be a problem. But running automatated, it's cause a big problem because generate an alert and trading where should not.


Can anyone help me here?

<ex4 file deleted>

Here is an nmc working version of that - but beware of its repainting behavior (in some cases) as it using centered tma

It is centered tma (center of gravity)


1


p

Files:
TMAwCG.mq4  10 kb
 
mntiwana:

Here is an nmc working version of that - but beware of its repainting behavior (in some cases) as it using centered tma

It is centered tma (center of gravity)




Thank you very much for your help.


But what I noticed is a strange behavior when I try to use it for automated trading.

For example, when I configure the deviation form 2.5 to 4.0 as example we are going to have the external bands larger, correect?


But the alert is generated as the band is 2.5 Always. I try to play around with the others settings, but I did not get any change.

Do you know why?

 
leoguisanchez:

Thank you very much for your help.


But what I noticed is a strange behavior when I try to use it for automated trading.

For example, when I configure the deviation form 2.5 to 4.0 as example we are going to have the external bands larger, correect?


But the alert is generated as the band is 2.5 Always. I try to play around with the others settings, but I did not get any change.

Do you know why?

Because the band didn't much it
 
  1. Naguisa Unada: This file is corrupted.
    The source is just fine.

  2. In build 1090 (May 2017) buffers no longer defaults to DRAW_LINE. You must explicitly set (the first 3) them:
    #property   indicator_typeX   DRAW_LINE                  // Bug 1090 must set.
    or
    SetIndexStyle(X-1, DRAW_LINE);                           // Or in OnInit().
    

  3. Why did you post your MT4 question in the Root / MT5 General section instead of the MQL4 section, (bottom of the Root page?)
              General rules and best pratices of the Forum. - General - MQL5 programming forum
    Next time post in the correct place. The moderators will likely move this thread there soon.