Help to fine tune an advisor, an indicator - page 11

 
Good afternoon, everyone. I need your help urgently. Please help me with an alert in a popup window to the indicators. I am a total ignoramus about it.
 
Good afternoon, everyone. I need your help urgently. Please help me with an alert in a popup window to the indicators. I'm a total ignoramus myself.
Files:
 
senszevs:
Help to add an alert in a pop-up window to indicators

Signal to the indicator on a new bar


Files:
 

Good afternoon to all and happy holidays.

Please help me to improve the indicator that builds the zones on the chart.

In the current indicator the zones are set for all days of the week.

I need to be able to set zones for eachday of the week(Monday-Friday) separately.

//+------------------------------------------------------------------+
//|                                            2 ЗОНЫ.mq4            |
//|                                                                  |
//|                                                                  |
//|                                                                  |
//|  2017                                                            |
//+------------------------------------------------------------------+

#property indicator_chart_window

//------- Внешние параметры индикатора -------------------------------
extern int    NumberOfDays = 15;        // Количество дней
extern string Begin_1      = "03:00";
extern string End_1        = "07:00";
extern color  Color_1      = PowderBlue;
extern string Begin_2      = "09:00";
extern string End_2        = "15:30";
extern color  Color_2      = Yellow;
extern bool   HighRange    = true;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
void init() {
  DeleteObjects();
  for (int i=0; i<NumberOfDays; i++) {
    CreateObjects("PWT1"+i, Color_1);
    CreateObjects("PWT2"+i, Color_2);
  }
  Comment("");
}

//+------------------------------------------------------------------+
//| 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("PWT1"+i);
    ObjectDelete("PWT2"+i);
  }
}

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

  for (int i=0; i<NumberOfDays; i++) {
    DrawObjects(dt, "PWT1"+i, Begin_1, End_1);
    DrawObjects(dt, "PWT2"+i, Begin_2, End_2);
    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, t3;
  double   p1, p2, p3;
  int      b1, b2;

  t1=StrToTime(TimeToStr(dt, TIME_DATE)+" "+tb);
  t2=StrToTime(TimeToStr(dt, TIME_DATE)+" "+te);
  t3=StrToTime(TimeToStr(dt, TIME_DATE)+" ""23:00");
  b1=iBarShift(NULL, 0, t1);                            //Поиск бара по времени
  b2=iBarShift(NULL, 0, t2);
  p1=High[iHighest(NULL, PERIOD_M5, MODE_HIGH, b1-b2, b2)];  // вставлено PERIOD_M5 вместо 0
  p2=Low [iLowest (NULL, PERIOD_M5, MODE_LOW , b1-b2, b2)]; // вставлено PERIOD_M5 вместо 0
  p3=p2;
  if (!HighRange) {p1=0; p2=2*p2;}
  ObjectSet(no, OBJPROP_TIME1 , t1);
  ObjectSet(no, OBJPROP_PRICE1, p1);
  ObjectSet(no, OBJPROP_TIME2 , t2);
  ObjectSet(no, OBJPROP_PRICE2, p2);
  ObjectSet(no, OBJPROP_TIME2 , t3);
  ObjectSet(no, OBJPROP_PRICE2, p3);
}

//+------------------------------------------------------------------+
//| Уменьшение даты на один торговый день                            |
//| Параметры:                                                       |
//|   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));
}
//+------------------------------------------------------------------+
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Для получения текущей рыночной информации служат функции SymbolInfoInteger(), SymbolInfoDouble() и SymbolInfoString(). В качестве второго параметра этих функций допустимо передавать один из идентификаторов из перечислений ENUM_SYMBOL_INFO_INTEGER, ENUM_SYMBOL_INFO_DOUBLE и ENUM_SYMBOL_INFO_STRING соответственно. Некоторые символы (как...
 
Hello, happy Holidays everyone. I have to make a stop trailing a common stop on all Sell and Buy trades taken together. When a total profit is reached in the money trades are not opened again and after a step trailing total profit, then all trades are closed with a profit and the EA starts trading again. Without loss does not work correctly, it also needs improvement.
Files:
TFChan_v1.mq4  57 kb
TFChan_v1.ex4  43 kb
 

Help add function to the indicator:

  • Alert for maximum values at previous 1 or 2 bars
  • At the start of the bar, first third/ Bulls will need to have the maximum values on the bottom and Bears will need to have the maximum values on the top /
At least 2 new buffers: Buy Bulls and Sell Bears signals
Files:
 

Hello guys help me with the indicators

Can anyone help me with the hill indicator.

I have an indicator, but there is a notification in MT4 d not good
example only signal down , signal up came
i mean i want a notification like EURUSD signal up GDPUSD signal down etc on all currency pairs
Can someone edit this type of notification . plz ,

I want to change the notifications for the first and the second one for the grail indicator.

The signal came out before I looked at it had already gone because the signal goes to the current candle

 

Good afternoon, there is an indicator (I have already written about it in another section), I would like to tweak it a bit, so that starting 1-minute time frame (TF) and up to the 4-hour chart with a weak movement showed yellow, and when there is no movement, or white, or do not show anything. And since the daily chart, if the open price is above the close price - green, on the contrary - red, and if the open price is equal to the close price - blue. Images, the indicator and patterns are attached.

And normally, to see the strength of each currency individually it should be done as a percentage, for example:

82% 17% 23% 82% 44% 95%

USD = CHF - GBP - EUR - JPY - CAD

This example shows that USD is stronger than CHF, GBP, JPY is weaker than CAD and in a flat state with EUR

Judging by the Friday charts, USD is stronger than CHF, EUR and flat with GBP, I cannot say anything about JPY and CAD, I do not follow them ,

I don't follow them because they don't play the main role in the market.

Files:
Nabor.tpl  157 kb
nabor1.tpl  524 kb
USDCHFH4.png  12 kb
EURUSDH1.png  5 kb
 
Good evening . Can you please tell me where I can find some open source Fibonacci expansion EA. I would be very grateful if someone could post it here if there is one.
 
Darirunu:
Good evening . Can you please tell me where I can find some open source Fibonacci expansion EA. I would be very grateful if someone could post it here if there is any.

Search to help

Fourth Fifth Sixth Advisors

Поиск - MQL5.community
Поиск - MQL5.community
  • www.mql5.com
Поиск выполняется с учетом морфологии и без учета регистра. Все буквы, независимо от того, как они введены, будут рассматриваться как строчные. По умолчанию наш поиск показывает страницы...
Reason: