Page 30 of 56

Re: ADX DMI Indicators for MT4

Posted: Wed Sep 30, 2020 1:19 am
by mrtools
naluvs01 wrote: Tue Sep 29, 2020 11:59 am
Hi Mr. Tools,

I inserted the code but the results are the same. As you can see, I set the level to 30 and there should be no signals at all because the Di +/- did not cross the level. However, there are arrows drawn. Unless the arrows represent the other color lines. And I was happy to add the code and had no errors after I compiled. We're close. I just need an alert when the Di+/- crosses the predefined user level...Thank you again in advance for your help!
Try this one, and the arrows are coded for the di +/- cross only.

Re: ADX DMI Indicators for MT4

Posted: Wed Sep 30, 2020 8:19 pm
by chris006
Hello mrtools,

I believe the "wilders dmi 3.5 arrows.mq4" in the post quoted below is the latest file.
Is it possible to add the option of drawing a moving average on the adx line? Dragging the standard moving average of mt4 onto the indicator does not work.

mrtools wrote: Wed Sep 30, 2020 1:19 am

Try this one, and the arrows are coded for the di +/- cross only.

Re: ADX DMI Indicators for MT4

Posted: Thu Oct 01, 2020 2:37 am
by mrtools
chris006 wrote: Wed Sep 30, 2020 8:19 pm Hello mrtools,

I believe the "wilders dmi 3.5 arrows.mq4" in the post quoted below is the latest file.
Is it possible to add the option of drawing a moving average on the adx line? Dragging the standard moving average of mt4 onto the indicator does not work.


Added an adx ma option.

Re: ADX DMI Indicators for MT4

Posted: Sat Oct 03, 2020 2:44 am
by RZAMK
mrtools wrote: Thu Oct 01, 2020 2:37 am

Added an adx ma option.
Dear Sir,
Is it possible to create an option in this indi that can be seen upside down?

Re: ADX DMI Indicators for MT4

Posted: Fri Oct 30, 2020 1:13 pm
by RVelasco
Sr Mrtools
Do we have a similar version of this that shows the arrow on open candle rather?
No Repainting

Code: Select all

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red

extern int ADXbars = 14;
extern int CountBars = 350;
double G_ibuf_84[];
double G_ibuf_88[];
double G_iadx_92;
double G_iadx_100;
double G_iadx_108;
double G_iadx_116;

int init() {
   IndicatorBuffers(2);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 108);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 108);
   SetIndexBuffer(0, G_ibuf_84);
   SetIndexBuffer(1, G_ibuf_88);
   return (0);
}

int start() {
   if (CountBars >= Bars) CountBars = Bars;
   SetIndexDrawBegin(0, Bars - CountBars);
   SetIndexDrawBegin(1, Bars - CountBars);
   int ind_counted_8 = IndicatorCounted();
   if (ind_counted_8 < 0) return (-1);
   if (ind_counted_8 < 1) {
      for (int Li_0 = 1; Li_0 <= CountBars; Li_0++) G_ibuf_84[CountBars - Li_0] = 0.0;
      for (Li_0 = 1; Li_0 <= CountBars; Li_0++) G_ibuf_88[CountBars - Li_0] = 0.0;
   }
   for (int Li_4 = CountBars; Li_4 >= 0; Li_4--) {
      G_iadx_92 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, Li_4 - 1);
      G_iadx_100 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, Li_4);
      G_iadx_108 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, Li_4 - 1);
      G_iadx_116 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, Li_4);
      if (G_iadx_92 > G_iadx_108 && G_iadx_100 < G_iadx_116) G_ibuf_84[Li_4] = Low[Li_4] - 5.0 * Point;
      if (G_iadx_92 < G_iadx_108 && G_iadx_100 > G_iadx_116) G_ibuf_88[Li_4] = High[Li_4] + 5.0 * Point;
   }
   return (0);
}

Or would it be possible to create alerts during the candle without repainting?

Re: ADX DMI Indicators for MT4

Posted: Sat Oct 31, 2020 3:09 am
by mrtools
RVelasco wrote: Fri Oct 30, 2020 1:13 pm Sr Mrtools
Do we have a similar version of this that shows the arrow on open candle rather?
No Repainting

Code: Select all

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Lime
#property indicator_color2 Red

extern int ADXbars = 14;
extern int CountBars = 350;
double G_ibuf_84[];
double G_ibuf_88[];
double G_iadx_92;
double G_iadx_100;
double G_iadx_108;
double G_iadx_116;

int init() {
   IndicatorBuffers(2);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 108);
   SetIndexStyle(1, DRAW_ARROW);
   SetIndexArrow(1, 108);
   SetIndexBuffer(0, G_ibuf_84);
   SetIndexBuffer(1, G_ibuf_88);
   return (0);
}

int start() {
   if (CountBars >= Bars) CountBars = Bars;
   SetIndexDrawBegin(0, Bars - CountBars);
   SetIndexDrawBegin(1, Bars - CountBars);
   int ind_counted_8 = IndicatorCounted();
   if (ind_counted_8 < 0) return (-1);
   if (ind_counted_8 < 1) {
      for (int Li_0 = 1; Li_0 <= CountBars; Li_0++) G_ibuf_84[CountBars - Li_0] = 0.0;
      for (Li_0 = 1; Li_0 <= CountBars; Li_0++) G_ibuf_88[CountBars - Li_0] = 0.0;
   }
   for (int Li_4 = CountBars; Li_4 >= 0; Li_4--) {
      G_iadx_92 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, Li_4 - 1);
      G_iadx_100 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_PLUSDI, Li_4);
      G_iadx_108 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, Li_4 - 1);
      G_iadx_116 = iADX(NULL, 0, ADXbars, PRICE_CLOSE, MODE_MINUSDI, Li_4);
      if (G_iadx_92 > G_iadx_108 && G_iadx_100 < G_iadx_116) G_ibuf_84[Li_4] = Low[Li_4] - 5.0 * Point;
      if (G_iadx_92 < G_iadx_108 && G_iadx_100 > G_iadx_116) G_ibuf_88[Li_4] = High[Li_4] + 5.0 * Point;
   }
   return (0);
}

Or would it be possible to create alerts during the candle without repainting?
No, not that I'm aware of.

Re: ADX DMI Indicators for MT4

Posted: Sat Oct 31, 2020 3:25 am
by RVelasco
You dont have anything like that without repainting Sr Mrtools ?

Re: ADX DMI Indicators for MT4

Posted: Sat Oct 31, 2020 6:43 am
by mrtools
RVelasco wrote: Sat Oct 31, 2020 3:25 am You dont have anything like that without repainting Sr Mrtools ?
Try this one here app.php/attach/file/3335506

Re: ADX DMI Indicators for MT4

Posted: Tue Nov 03, 2020 4:39 am
by camisa
mrtools wrote: Thu Oct 01, 2020 2:37 am

Added an adx ma option.
hello mrtools
wilders DMI 3.6 is great but I think the audio alert = current bar isn't working properly, sometimes the arrow appears but no alert goes up, can you please check it?

Re: ADX DMI Indicators for MT4

Posted: Tue Nov 03, 2020 5:17 am
by mrtools
camisa wrote: Tue Nov 03, 2020 4:39 am

hello mrtools
wilders DMI 3.6 is great but I think the audio alert = current bar isn't working properly, sometimes the arrow appears but no alert goes up, can you please check it?
The alerts are based plusdi/minusdi cross and plusdi/minusdi greater than the level, the arrows are based on the plusdi/minusdi cross only.