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.
here the Code :
//+------------------------------------------------------------------+
//| t_ma.mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 MediumBlue
#property indicator_color2 Blue
#property indicator_color3 DodgerBlue
#property indicator_color4 DeepSkyBlue
#property indicator_color5 SkyBlue
#property indicator_color6 Aqua
#property indicator_color7 Aquamarine
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 1
#property indicator_width4 1
#property indicator_width5 1
#property indicator_width6 1
#property indicator_width7 1//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];double ExtMapBuffer3[];
double ExtMapBuffer4[];double ExtMapBuffer5[];
double ExtMapBuffer6[];double ExtMapBuffer7[];
extern int MA_Period=100;
extern int ad1 = 2;
extern int ad2 = 4;
extern int ad3 = 6;
extern int ad4 = 8;
extern int ad5 = 10;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
int limit = MathMin(Bars-counted_bars,Bars-1);
if (ad1<0) limit=MathMax(limit,-ad1);
if (ad2<0) limit=MathMax(limit,-ad2);
if (ad3<0) limit=MathMax(limit,-ad3);
if (ad4<0) limit=MathMax(limit,-ad4);
if (ad5<0) limit=MathMax(limit,-ad5);
for(int i=limit;i>=0;i--)
{
ExtMapBuffer1=iMA(NULL,0,MA_Period,0,MODE_LWMA,PRICE_OPEN,i);
ExtMapBuffer2=(ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1)/6.0;
}
for( i=limit;i>=0;i--)
{
ExtMapBuffer3= ExtMapBuffer2; if (ExtMapBuffer3==0) ExtMapBuffer3=EMPTY_VALUE;
ExtMapBuffer4= ExtMapBuffer2; if (ExtMapBuffer4==0) ExtMapBuffer4=EMPTY_VALUE;
ExtMapBuffer5= ExtMapBuffer2; if (ExtMapBuffer5==0) ExtMapBuffer5=EMPTY_VALUE;
ExtMapBuffer6= ExtMapBuffer2; if (ExtMapBuffer6==0) ExtMapBuffer6=EMPTY_VALUE;
ExtMapBuffer7= ExtMapBuffer2; if (ExtMapBuffer7==0) ExtMapBuffer7=EMPTY_VALUE;
}
//----
return(0);
}
//+------------------------------------------------------------------+stonehome
That is not hull average. That is somewhat smoothed lwma with some shifting done on it
Mladen that's ok,
but I just wanted to write, if you can give me change this indicator (t_ma) !!!!!
in a HMA (Hull Moving Average) - Version
does it or will not do
Thanks anyway for your efforts
stonehome
Can this be made multi time frame please.
Updated Super trend volty like : SuperTrend volty like 2 nmc.mq4
Originally it was posted here : https://www.mql5.com/en/forum/173574/page333
here the Code :
//+------------------------------------------------------------------+
//| t_ma.mq4 |
//| |
//| |
//+------------------------------------------------------------------+
#property copyright ""
#property link ""
#property indicator_chart_window
#property indicator_buffers 7
#property indicator_color1 MediumBlue
#property indicator_color2 Blue
#property indicator_color3 DodgerBlue
#property indicator_color4 DeepSkyBlue
#property indicator_color5 SkyBlue
#property indicator_color6 Aqua
#property indicator_color7 Aquamarine
#property indicator_width1 1
#property indicator_width2 1
#property indicator_width3 1
#property indicator_width4 1
#property indicator_width5 1
#property indicator_width6 1
#property indicator_width7 1//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];double ExtMapBuffer3[];
double ExtMapBuffer4[];double ExtMapBuffer5[];
double ExtMapBuffer6[];double ExtMapBuffer7[];
extern int MA_Period=100;
extern int ad1 = 2;
extern int ad2 = 4;
extern int ad3 = 6;
extern int ad4 = 8;
extern int ad5 = 10;
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
SetIndexStyle(0,DRAW_LINE);
SetIndexBuffer(0,ExtMapBuffer1);
SetIndexStyle(1,DRAW_LINE);
SetIndexBuffer(1,ExtMapBuffer2);
SetIndexStyle(2,DRAW_LINE);
SetIndexBuffer(2,ExtMapBuffer3);
SetIndexStyle(3,DRAW_LINE);
SetIndexBuffer(3,ExtMapBuffer4);
SetIndexStyle(4,DRAW_LINE);
SetIndexBuffer(4,ExtMapBuffer5);
SetIndexStyle(5,DRAW_LINE);
SetIndexBuffer(5,ExtMapBuffer6);
SetIndexStyle(6,DRAW_LINE);
SetIndexBuffer(6,ExtMapBuffer7);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
int limit = MathMin(Bars-counted_bars,Bars-1);
if (ad1<0) limit=MathMax(limit,-ad1);
if (ad2<0) limit=MathMax(limit,-ad2);
if (ad3<0) limit=MathMax(limit,-ad3);
if (ad4<0) limit=MathMax(limit,-ad4);
if (ad5<0) limit=MathMax(limit,-ad5);
for(int i=limit;i>=0;i--)
{
ExtMapBuffer1=iMA(NULL,0,MA_Period,0,MODE_LWMA,PRICE_OPEN,i);
ExtMapBuffer2=(ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1+ExtMapBuffer1)/6.0;
}
for( i=limit;i>=0;i--)
{
ExtMapBuffer3= ExtMapBuffer2; if (ExtMapBuffer3==0) ExtMapBuffer3=EMPTY_VALUE;
ExtMapBuffer4= ExtMapBuffer2; if (ExtMapBuffer4==0) ExtMapBuffer4=EMPTY_VALUE;
ExtMapBuffer5= ExtMapBuffer2; if (ExtMapBuffer5==0) ExtMapBuffer5=EMPTY_VALUE;
ExtMapBuffer6= ExtMapBuffer2; if (ExtMapBuffer6==0) ExtMapBuffer6=EMPTY_VALUE;
ExtMapBuffer7= ExtMapBuffer2; if (ExtMapBuffer7==0) ExtMapBuffer7=EMPTY_VALUE;
}
//----
return(0);
}
//+------------------------------------------------------------------+Stonehome, made a Hma version.
t_hma.mq4
fantastic
Many many thanks mr mrtools
Jack
Hi Mladen ... please check this indicator.. the MTF function is not working... thank you
rk-kcv8-wmtf-txt-zo-trend_arrows.mq4
PS. I think my posts have been deleted.Hi Mrtools and Mladen able to help me with this? MTF function is so buggy. Many thanks
Hi Mladen ... please check this indicator.. the MTF function is not working... thank you
rk-kcv8-wmtf-txt-zo-trend_arrows.mq4
PS. I think my posts have been deleted.MwambaFX, made this version and the mtf is working, for the text it location is controlled by valueLoc.
keltner_channels_alerts__text_mtf.mq4
MwambaFX, made this version and the mtf is working, for the text it location is controlled by valueLoc.

keltner_channels_alerts__text_mtf.mq4God bless you my brother. I deeply mean it.
Dear MR malden and all devloper i need PZLopezTrend indi to be mtf
you can read data from the indicator using the iCustom() function as exemplifiedin https://www.mql5.com/en/docs/indicators/icustom
i attach the indi wait your help thank