I need 2 indicators

 

Hi guys, 

how are you? i'm switching to MT5 and i need to have those 2 indicators i'm actually using on MT4.

There is someone so kind to create it for me or at least convert them?

Let me know and have a nice day.

ciao

Sam

<ex4 file deleted>

Files:
 
You should post your request in the Freelance section.
 
You have only four choices:
  1. Search for it.
  2. Beg at
  3. MT4: Learn to code it.
    MT5: Begin learning to code it.
    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
  4. or pay (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum
We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help
 


Eleni Anna Branou:
You should post your request in the Freelance section.


Thank you:)

 
William Roeder:
You have only four choices:
  1. Search for it.
  2. Beg at
  3. MT4: Learn to code it.
    MT5: Begin learning to code it.
    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.
  4. or pay (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum

We're not going to code it for you (although it could happen if you are lucky or the problem is interesting.) We are willing to help you when you post your attempt (using CODE button) and state the nature of your problem.
          No free help


Hi, 

i never mentioned free help but thanks anyway for your reply.

cheers 

 
Samuele Gozzo: i never mentioned free help
Show us your attempt (using the CODE button) and state the nature of your problem.
          No free help 2017.04.21
 

MT4 Source

//+------------------------------------------------------------------+
//|                                           Daily Range.mq4 |
//+------------------------------------------------------------------+

#property indicator_chart_window

extern int      NumOfDays             = 10;
extern string   FontName              = "Courier New";
extern int      FontSize              = 10;
extern color    FontColor             = White;
extern int      Window                = 0;
extern int      Corner                = 0;
extern int      HorizPos              = 5;
extern int      VertPos               = 20;

double pnt;
int    dig;
string objname = "*DRPE";

//+------------------------------------------------------------------+
int init()  {
//+------------------------------------------------------------------+
  pnt = MarketInfo(Symbol(),MODE_POINT);
  dig = MarketInfo(Symbol(),MODE_DIGITS);
  if (dig == 3 || dig == 5) {
    pnt *= 10;
  }  
  ObjectCreate(objname,OBJ_LABEL,Window,0,0);
  return(0);
}

//+------------------------------------------------------------------+
int deinit()  {
//+------------------------------------------------------------------+
  ObjectDelete(objname);
  return(0);
}

//+------------------------------------------------------------------+
int start()  {
//+------------------------------------------------------------------+
  int c=0;
  double sum=0;
  for (int i=1; i<Bars-1; i++)  {
    double hi = iHigh(NULL,PERIOD_D1,i);
    double lo = iLow(NULL,PERIOD_D1,i);
    datetime dt = iTime(NULL,PERIOD_D1,i);
    if (TimeDayOfWeek(dt) > 0 && TimeDayOfWeek(dt) < 6)  {
      sum += hi - lo;
      c++;
      if (c>=NumOfDays) break;
  } }
  hi = iHigh(NULL,PERIOD_D1,0);
  lo = iLow(NULL,PERIOD_D1,0);
  if (i>0 && pnt>0)  {
    string objtext = "ADR = " + DoubleToStr(sum/c/pnt,1) + "  (" + c + " days)     Today = " + DoubleToStr((hi-lo)/pnt,1);
    ObjectSet(objname,OBJPROP_CORNER,Corner);
    ObjectSet(objname,OBJPROP_XDISTANCE,HorizPos);
    ObjectSet(objname,OBJPROP_YDISTANCE,VertPos);
    ObjectSetText(objname,objtext,FontSize,FontName,FontColor);
  }  
  return(0);
}
 

MT5 Remake

/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// DATA 1                                                                 //<  >
//------------------------------------------------------------------------//<-->
#property     copyright "Copyright 2020, MetaQuotes Software Corp."       //< 1>
#property     link      "https://www.mql5.com"                            //< 2>
#property     version   "1.000"                                           //< 3>
#property     indicator_chart_window                                      //< 4>
#property     indicator_buffers    1                                      //< 5>
#property     indicator_plots      1                                      //< 6>
                                                                          //< 7>
string        LABEL_NAME      = "AIS DAILY RANGE"                       ; //< 8>
string        SYMBOL          = _Symbol                                 ; //< 9>
int           DIGITS          = _Digits                                 ; //<10>
double        POINT           = _Point                                  ; //<11>
long          CHART           =   NULL                                  ; //<12>
                                                                          //<13>
MqlDateTime   TIME_STRUCTURE  = { NULL }                                ; //<14>
                                                                          //<15>
                                                                          //<16>
                                                                          //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// DATA 2                                                                 //<  >
//------------------------------------------------------------------------//<-->
sinput string S1="=================="; /* ============================ */ //< 1>
input int     DAYS            = 10   ; /* NUMBER OF DAYS               */ //< 2>
sinput string S2="=================="; /* == LABEL FONT ============== */ //< 3>
input string  FONT_NAME       = "Courier New" ; /* FONT NAME           */ //< 4>
input int     FONT_SIZE       = 10            ; /* FONT SIZE           */ //< 5>
input color   FONT_COLOR      = White         ; /* FONT COLOR          */ //< 6>
sinput string S3="=================="; /* == LABEL POSITION ========== */ //< 7>
input int     X               =  5   ; /* X DISTANCE                   */ //< 8>
input int     Y               = 20   ; /* Y DISTANCE                   */ //< 9>
input int     CORNER          =  0   ; /* CORNER                       */ //<10>
input int     WINDOW          =  0   ; /* WINDOW                       */ //<11>
sinput string S4="=================="; /* ============================ */ //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
                                                                          //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// FUNCTION 1                                                             //<  >
//------------------------------------------------------------------------//<-->
int    OnInit ()                                                        { //< 1>
                                                                          //< 2>
ObjectCreate     ( CHART , LABEL_NAME , OBJ_LABEL , WINDOW , 0 , 0    ) ; //< 3>
                                                                          //< 4>
ObjectSetInteger ( CHART , LABEL_NAME , OBJPROP_CORNER    , CORNER    ) ; //< 5>
ObjectSetInteger ( CHART , LABEL_NAME , OBJPROP_XDISTANCE , X         ) ; //< 6>
ObjectSetInteger ( CHART , LABEL_NAME , OBJPROP_YDISTANCE , Y         ) ; //< 7>
                                                                          //< 8>
ObjectSetInteger ( CHART , LABEL_NAME , OBJPROP_COLOR    , FONT_COLOR ) ; //< 9>
ObjectSetString  ( CHART , LABEL_NAME , OBJPROP_FONT     , FONT_NAME  ) ; //<10>
ObjectSetInteger ( CHART , LABEL_NAME , OBJPROP_FONTSIZE , FONT_SIZE  ) ; //<11>
                                                                          //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
return INIT_SUCCEEDED                                                 ; } //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// FUNCTION 2                                                             //<  >
//------------------------------------------------------------------------//<-->
void   OnDeinit     ( const int   REASON )                              { //< 1>
                                                                          //< 2>
       ObjectDelete ( CHART , LABEL_NAME )                              ; //< 3>
       ChartRedraw  ( CHART              )                              ; //< 4>
                                                                          //< 5>
                                                                          //< 6>
                                                                          //< 7>
                                                                          //< 8>
                                                                          //< 9>
                                                                          //<10>
                                                                          //<11>
                                                                          //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
                                                                        } //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// FUNCTION 3                                                             //<  >
//------------------------------------------------------------------------//<-->
int    OnCalculate ( const int RATES_TOTAL , const int CALCULATED     ,   //< 1>
                     const int BEGIN       , const double & PRICE []  ) { //< 2>
                                                                          //< 3>
double SUM     =  NULL                                                  ; //< 4>
int    COUNTER =  NULL                                                  ; //< 5>
for  ( COUNTER = 1  ; COUNTER <= DAYS ; COUNTER ++ )                      //< 6>
       SUM += RANGE ( COUNTER )                                         ; //< 7>
                                                                          //< 8>
       DRAW_LABEL ( SUM , COUNTER - 1 )                                 ; //< 9>
                                                                          //<10>
                                                                          //<11>
                                                                          //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
return RATES_TOTAL                                                    ; } //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// FUNCTION 4                                                             //<  >
//------------------------------------------------------------------------//<-->
double RANGE ( int INDEX )                                              { //< 1>
                                                                          //< 2>
TimeToStruct ( iTime ( SYMBOL , PERIOD_D1 , INDEX ) , TIME_STRUCTURE )  ; //< 3>
                                                                          //< 4>
if ( TIME_STRUCTURE.day_of_week > 0                                       //< 5>
  && TIME_STRUCTURE.day_of_week < 6 )                                     //< 6>
     return iHigh ( SYMBOL , PERIOD_D1 , INDEX )                          //< 7>
          - iLow  ( SYMBOL , PERIOD_D1 , INDEX )                        ; //< 8>
else                                                                      //< 9>
     return NULL                                                      ; } //<10>
                                                                          //<11>
                                                                          //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
                                                                          //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
// AIS DAILY RANGE INDICATOR                                                  //
//============================================================================//
// FUNCTION 5                                                             //<  >
//------------------------------------------------------------------------//<-->
int    DRAW_LABEL ( double SUM , int COUNTER )                          { //< 1>
                                                                          //< 2>
double RANGE_0 = iHigh ( SYMBOL , PERIOD_D1 , 0 )                         //< 3>
               - iLow  ( SYMBOL , PERIOD_D1 , 0 )                       ; //< 4>
string TEXT =                                                             //< 5>
"ADR= "       + DoubleToString  ( SUM / COUNTER / POINT , 1 )             //< 6>
+ " ("        + IntegerToString ( COUNTER ) + " DAYS)"                    //< 7>
+ " TODAY= "  + DoubleToString  ( RANGE_0       / POINT , 1 )             //< 8>
+ " VOLUME= " + IntegerToString ( iVolume ( SYMBOL , PERIOD_D1 , 0  ) ) ; //< 9>
                                                                          //<10>
ObjectSetString ( CHART , LABEL_NAME , OBJPROP_TEXT , TEXT            ) ; //<11>
ChartRedraw     ( CHART                                               ) ; //<12>
                                                                          //<13>
                                                                          //<14>
                                                                          //<15>
                                                                          //<16>
return true                                                           ; } //<17>
//============================================================================//
// AIS AIRAT SAFIN                                           2020-05-01 01:17 //
/******************************************************************************/
 

AIS DAILY RANGE INDICATOR

AIS DAILY RANGE INDICATOR

Reason: