Reading buffer values from custom indicators

 

Hi everyone, I am programming in MQL4 for some time but there is an issue I can't resolve and it is around using buffers in custom indicators.

Specifically, it is one indicator that I found online(i have it's source code). 

Here is the picture of the indicator

***

How I approached the problem:

I've seen that there are 5 indicator buffers, and i didn't know which buffer is for what, since there is only 1 line that interests me, so what i did is I checked for all 5 buffers, what are the values when the V is formed. That is when i want to take a buy in my simple EA. So then, I just made my EA with one big if statement that checks values of all 5 buffers for 3 different candles, so 15 values at total, and if they are all correct, i take a buy. The problem is that sometimes, even that the line is straight, bot takes some Buy trades, which means the buffers values are just like when forming a V, and then I don't get it how the indicator works?

I will put the source code down so if someone wants to help me with this.

Thanks a lot in advance!

 
  1. Why did you post your MT4 question in the 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.


  2. Luka Savić: nd i didn't know which buffer is for what, 
    #property indicator_color1                      Red
    #property indicator_color2                      DodgerBlue
    #property indicator_color3                      Black
    #property indicator_color4                      White
    #property indicator_color5                      Blue

    Is it not obvious which one you want? The index in iCustom is one less (0-4).

 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".