I need help editing an already created indicator

To add comments, please log in or register
Jonathon Lewis
129
Jonathon Lewis  

I need help editing this indicator...

 

Here is this indicator here...

I need to add a few shadow areas and adjust where and how the zones appear... If you can help me simply instal this indicator and you will see that at provides and Asian range high/low....

I need you to help me create/edit this indicator so that a shadow zone paints everyday at 3:00am-5:00am EST (25 pips) above and below the asian range blue box.

 If you are able to help me i will explain in full detail why i am needing this indicator and this secret strategy can make you a fortune i will show you how to use it, unfortunately i cannot code this indicator for myself thanks for your help in advance below i have attached a picture of what I am needing.

honest_knave
Moderator
2302
honest_knave  
Jonathon Lewis:

I need help editing this indicator...

 

Here is this indicator here...

I need to add a few shadow areas and adjust where and how the zones appear... If you can help me simply instal this indicator and you will see that at provides and Asian range high/low....

I need you to help me create/edit this indicator so that a shadow zone paints everyday at 3:00am-5:00am EST (25 pips) above and below the asian range blue box.

 If you are able to help me i will explain in full detail why i am needing this indicator and this secret strategy can make you a fortune i will show you how to use it, unfortunately i cannot code this indicator for myself thanks for your help in advance below i have attached a picture of what I am needing.

Nobody is going to be able to help you without the source (.mq4) file, I'm afraid.

It may be easier to get someone to code it for you from scratch. Take a look in the freelance section - it shouldn't cost much given the fortune-making ability of your secret strategy.

Jonathon Lewis
129
Jonathon Lewis  
The source code EX4 is attached 
Jonathon Lewis
129
Jonathon Lewis  

Here is the full Source Code*******************************************

//+------------------------------------------------------------------+
//|                                                   i-Sessions.mq4 |
//|                                           Êèì Èãîðü Â. aka KimIV |
//|                                                                  |
//|  16.11.2005  Èíäèêàòîð òîðãîâûõ ñåññèé                           |
//+------------------------------------------------------------------+
#property copyright "Êèì Èãîðü Â. aka KimIV"
#property link      "http://www.kimiv.ru"

#property indicator_chart_window

//------- Âíåøíèå ïàðàìåòðû èíäèêàòîðà -------------------------------
extern int    NumberOfDays = 50;        // Êîëè÷åñòâî äíåé
extern string AsiaBegin    = "00:00";   // Îòêðûòèå àçèàòñêîé ñåññèè
extern string AsiaEnd      = "07:00";   // Çàêðûòèå àçèàòñêîé ñåññèè
extern color  AsiaColor    = LightSkyBlue; // Öâåò àçèàòñêîé ñåññèè
extern color  AsiaLabelColor   = White;
extern string EurBegin     = "07:00";   // Îòêðûòèå åâðîïåéñêîé ñåññèè
extern string EurEnd       = "16:00";   // Çàêðûòèå åâðîïåéñêîé ñåññèè
extern color  EurColor     = CLR_NONE;       // Öâåò åâðîïåéñêîé ñåññèè
extern color  EurLabelColor   = CLR_NONE;
extern string USABegin     = "13:00";   // Îòêðûòèå àìåðèêàíñêîé ñåññèè
extern string USAEnd       = "17:00";   // Çàêðûòèå àìåðèêàíñêîé ñåññèè
extern color  USAColor     = OrangeRed; // Öâåò àìåðèêàíñêîé ñåññèè
extern color  USALabelColor   = White;
int DigitsV;
double PointsV;

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void init() {
  DeleteObjects();
  for (int i=0; i<NumberOfDays; i++) {
    CreateObjects("AS"+i, AsiaColor);
    CreateObjects("EU"+i, EurColor);
    CreateObjects("US"+i, USAColor);
  }
  Comment("");
   DigitsV = MarketInfo(Symbol(), MODE_DIGITS);

   if (DigitsV >= 4) {
      PointsV = 0.0001;      
   } else {
      PointsV = 0.01;      
   }
  
}

//+------------------------------------------------------------------+
//| Custor indicator deinitialization function                       |
//+------------------------------------------------------------------+
void deinit() {
  DeleteObjects();
  Comment("");
}

//+------------------------------------------------------------------+
//| Ñîçäàíèå îáúåêòîâ èíäèêàòîðà                                     |
//| Ïàðàìåòðû:                                                       |
//|   no - íàèìåíîâàíèå îáúåêòà                                      |
//|   cl - öâåò îáúåêòà                                              |
//+------------------------------------------------------------------+
void CreateObjects(string no, color cl) {
  ObjectCreate(no, OBJ_RECTANGLE, 0, 0,0, 0,0);
  ObjectSet(no, OBJPROP_STYLE, STYLE_SOLID);
  ObjectSet(no, OBJPROP_COLOR, cl);
  ObjectSet(no, OBJPROP_BACK, True);
  
}

//+------------------------------------------------------------------+
//| Óäàëåíèå îáúåêòîâ èíäèêàòîðà                                     |
//+------------------------------------------------------------------+
void DeleteObjects() {
  for (int i=0; i<NumberOfDays; i++) {
    ObjectDelete("AS"+i);
    ObjectDelete("EU"+i);
    ObjectDelete("US"+i);
    ObjectDelete("TextAS"+i);
    ObjectDelete("TextEU"+i);
    ObjectDelete("TextUS"+i);
    
  }
}

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
void start() {
  datetime dt=CurTime();

  for (int i=0; i<NumberOfDays; i++) {
    DrawObjects(dt, "AS"+i, AsiaBegin, AsiaEnd);
    DrawObjects(dt, "EU"+i, EurBegin, EurEnd);
    DrawObjects(dt, "US"+i, USABegin, USAEnd);
    dt=decDateTradeDay(dt);
    while (TimeDayOfWeek(dt)>5) dt=decDateTradeDay(dt);
  }
}

//+------------------------------------------------------------------+
//| Ïðîðèñîâêà îáúåêòîâ íà ãðàôèêå                                   |
//| Ïàðàìåòðû:                                                       |
//|   dt - äàòà òîðãîâîãî äíÿ                                        |
//|   no - íàèìåíîâàíèå îáúåêòà                                      |
//|   tb - âðåìÿ íà÷àëà ñåññèè                                       |
//|   te - âðåìÿ îêîí÷àíèÿ ñåññèè                                    |
//+------------------------------------------------------------------+
void DrawObjects(datetime dt, string no, string tb, string te) {
  datetime t1, t2;
  double   p1, p2;
  int      b1, b2;
  double   RangePips;
  string   RangePipsStr;
  color    LabelColor;

  t1=StrToTime(TimeToStr(dt, TIME_DATE)+" "+tb);
  t2=StrToTime(TimeToStr(dt, TIME_DATE)+" "+te);
  b1=iBarShift(NULL, 0, t1);
  b2=iBarShift(NULL, 0, t2);
  p1=High[Highest(NULL, 0, MODE_HIGH, b1-b2, b2)];
  p2=Low [Lowest (NULL, 0, MODE_LOW , b1-b2, b2)];
  ObjectSet(no, OBJPROP_TIME1 , t1);
  ObjectSet(no, OBJPROP_PRICE1, p1);
  ObjectSet(no, OBJPROP_TIME2 , t2);
  ObjectSet(no, OBJPROP_PRICE2, p2);

  RangePips = (p1-p2)/PointsV;
  RangePipsStr = DoubleToStr(RangePips,0);
  
  if (StringSubstr(no,0,2) == "AS") LabelColor = AsiaLabelColor;
  if (StringSubstr(no,0,2) == "EU") LabelColor = EurLabelColor;
  if (StringSubstr(no,0,2) == "US") LabelColor = USALabelColor;

  if (LabelColor != CLR_NONE) {
    ObjectCreate("Text"+no, OBJ_TEXT, 0, t1+(t2-t1)/2, p2);
    ObjectSetText("Text"+no,"Range = "+RangePipsStr,10,"Arial Bold",LabelColor);
    ObjectSet("Text"+no, OBJPROP_BACK, false);
  }  
          
  
}

//+------------------------------------------------------------------+
//| Óìåíüøåíèå äàòû íà îäèí òîðãîâûé äåíü                            |
//| Ïàðàìåòðû:                                                       |
//|   dt - äàòà òîðãîâîãî äíÿ                                        |
//+------------------------------------------------------------------+
datetime decDateTradeDay (datetime dt) {
  int ty=TimeYear(dt);
  int tm=TimeMonth(dt);
  int td=TimeDay(dt);
  int th=TimeHour(dt);
  int ti=TimeMinute(dt);

  td--;
  if (td==0) {
    tm--;
    if (tm==0) {
      ty--;
      tm=12;
    }
    if (tm==1 || tm==3 || tm==5 || tm==7 || tm==8 || tm==10 || tm==12) td=31;
    if (tm==2) if (MathMod(ty, 4)==0) td=29; else td=28;
    if (tm==4 || tm==6 || tm==9 || tm==11) td=30;
  }
  return(StrToTime(ty+"."+tm+"."+td+" "+th+":"+ti));
}
//+------------------------------------------------------------------+

Alain Verleyen
36160
Alain Verleyen  

Forum on trading, automated trading systems and testing trading strategies


Hello,

Please use the SRC button when you post code. Thank you.


This time, I edited it for you.


To add comments, please log in or register