Re: ADX DMI Indicators for MT4

291
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.
These users thanked the author mrtools for the post (total 3):
naluvs01, pipsquirrel, Jedidiah


Re: ADX DMI Indicators for MT4

292
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

293
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.
These users thanked the author mrtools for the post (total 10):
chris006, Jimmy, camisa, Lumios, xard777, RZAMK, alexm, pipsquirrel, macbeth, Jedidiah

IdeaRe: ADX DMI Indicators for MT4

295
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

296
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

300
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.


Who is online

Users browsing this forum: Abdi, Ahrefs [Bot], eka2, Google [Bot], kvak, Proximic [Bot], ssscary and 96 guests