Download MetaTrader 5
To add comments, please log in or register
Do you have questions on how to turn your idea into reality? Ask them on the Forum!
yerboholik
35
yerboholik 2015.06.30 20:39 
I need help modifying the ADX in MT5. Currently, the only parameter allowed to be entered by the user is the number of periods for the ADX. I need the ability to input a different time periods for the DMI.

Basically this would mean having the ability to set an 8 period moving average (ADX) of the 13 period differences in the DMI.

+DM:  Divide the 13-day smoothed Plus Directional Movement (+DM) by the 13-day smoothed True Range to find the 13-day Plus Directional Indicator (+DI13). Multiply by 100 to move the decimal point two places. This +DI13 is the Plus Directional Indicator (green line) that is plotted along with ADX.

-DM:  Divide the 13-day smoothed Minus Directional Movement (-DM) by the 13-day smoothed True Range to find the 13-day Minus Directional Indicator (-DI13). Multiply by 100 to move the decimal point two places. This -DI13 is the Minus Directional Indicator (red line) that is plotted along with ADX.

DMI:  The Directional Movement Index equals the absolute value of +DI13 less - DI13 divided by the sum of +DI13 and – DI13.

ADX: is simply a 8-day average of DX. Subsequent ADX values are smoothed by multiplying the previous 8-day ADX value by 7, adding the most recent DX value and dividing this total by 8.

I have had much success using the techniques from Charles Schaap: ADXcellence, which is why I’m asking for this indicator.
honest_knave
969
honest_knave 2015.06.30 20:54  

Hello yerboholik,

Welcome to the forum.

If you are modifying the code yourself, please post up the bits you are struggling with and I'm sure some of us will be able to assist.

If you're looking for someone to do the modification for you, you can find a great freelance section here

Alternatively, quite a few other forums have people offer free coding who might be able to help you.

Whatever course you choose, good luck! 

yerboholik
35
yerboholik 2015.06.30 21:02  

Hi,

I am fresh and new in MT4, I am new beginner.

If someone would like to guide i try to modify by my self.

And I would be very glad if someone help me.

Thank You for any information.

ffoorr
985
ffoorr 2015.07.01 05:41  

You will have to create an iCustom indicator, post a canvas, an attempt, fullfill this one :

Add the necessary extern : Per_adx, Per_DMI_plus, Per_smoothing, Per_ATR, and then the needed buffers, adx, dmi, atr, smoothing and so on

//+------------------------------------------------------------------+
//|                                                   ADXellence.mq4 |
//|                                                              GGG |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright ""
#property link      "https://www.mql5.com"
#property version   "1.00"
#property strict
#property indicator_separate_window
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+
/
To add comments, please log in or register