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
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 :
// here i the buffer as default it ' s blue SetIndexStyle (0, DRAW_ARROW, STYLE_SOLID,0, Blue);
SetIndexArrow (0, Wingdings.UP);
SetIndexBuffer(0, MA1.UP.Buffer);
SetIndexEmptyValue(0, 0.0);
//
something like thisif line 1 > line 2
MA1.UP.Buffer = Blue ;
else
MA1.UP.Buffer = Red ;
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 .
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
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 8so 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 .