![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello ;
firstly I would like to represent my indicator like that :
it's a great indicator that I found here :https://www.mql5.com/en/code/9402 but my problem is I would like to do the same but instead of moving average, I 'm basing on my own indicator that I call histogramtrend (it' s similar to MACD : there are 2 lines : and when the signal (line 1) cross over his moving average (line 2) it's positif (>0) and if it's opposite line 1 < line 2 it's negatif (<0)
so I think that I can call this indicator by usin Custom Indicator iCutstom () . so I need represent like that in picture when >0 blue and when <0 red . but my real problem is how to do like this, I try to understand the code here :
my first remark of this code (the original) is in he presents 8 buffers :
#property indicator_buffers 8
so as you can see there are 4 different moving average, so 2 buffers for each Moving average . I try to write an other code basing on the original and I would just try one Time frame so I suppose that I need 2 buffers to represent UP and Down . after, I compare the Moving average (1) to Moving average (13) . the code
the result is like this
as you can see there are 2 lines or in the original code there are 1 for each moving average . may be he ajusts the 2 line to be one but how ????
my second remark is in each line we saw that it changes color sometimes blue and sometimes red so I would like to answer if it 's possible to change the color of one buffer according to condition :
for example :
because here (in the original he creates one buffer for UP and one for Down .
My second problem and my second question is how can ajust the buffer (horizontal and vertical axes ) as you can see at the 2 pictures : the line on my code is on the top then in the original he adjusts it well .
if I resume : I would present my own indcator (in one file ) like this (first picture) my indicator is similar to macd (2 lines : if line 1 > line 2 : blue so if not red )
my first problem is on the creating Arrow and also adjusting it at the true position .
that 's my problem and thank you for your answer .