Alert Delay

MQL4 Скрипты

Работа завершена

Время выполнения 3 минуты
Отзыв от исполнителя
Good customer. Thank you for your order!
Отзыв от заказчика
very professional programmer !!!!!

Техническое задание

Hi, I wrote this simple code where the alert will appear after 10 seconds after the opening of the bar. I would like to know if you can have 10 real seconds after the end of the bar and not wait for the start of the new bar. (Time [0]).

 

//+------------------------------------------------------------------+
//|                                                  Delay_Alert.mq4 |
//|                        Copyright 2016, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+


//--- indicator settings
#property indicator_chart_window
#property indicator_buffers 2

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 0xFFAA00
#property indicator_label1 "Buy"

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 0x0000FF
#property indicator_label2 "Sell"
int CurrentTime;
int extern Period1=2;
 

//--- indicator buffers
double Buffer1[];
double Buffer2[];



//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {   
   IndicatorBuffers(2);
   SetIndexBuffer(0, Buffer1);
   SetIndexEmptyValue(0, 0);
   SetIndexArrow(0, 241);
   SetIndexBuffer(1, Buffer2);
   SetIndexEmptyValue(1, 0);
   SetIndexArrow(1, 242);
   
  
   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[])
 
  
{
  static datetime BarStart=0;
   static bool check=false;
    if(BarStart!=Time[0])
     {
      BarStart=Time[0];
      check=true;
     }
   if(check && TimeCurrent()>=Time[0]+10)
     {
      check=false;
      //Check Condition
    
  
      //Indicator Buffer 1
      if(iRSI(NULL, PERIOD_CURRENT, Period1, PRICE_CLOSE, 0) < 40
      
      )
        {
         Buffer1[0] = Low[0] - 10* Point();  
        }
      else
        {
         Buffer1[0] = 0;
        }
      //Indicator Buffer 2
      if(iRSI(NULL, PERIOD_CURRENT, Period1, PRICE_CLOSE, 0) > 60
     
      )
        {
         Buffer2[0] = High[0] + 10 * Point(); 
         
        }
      else
        {
         Buffer2[0] = 0;
        }
     }
      
return(0);
}
 //-----------------------------------------------------------------------------------------------------------------------------  
 

 

The indicator will use it for OB 60 seconds, so I want to be very precise. When the server timer is equal to 10 seconds to appear the arrow. In the examples that you sent me, the arrow appears in many cases after 12, 15 seconds, and that's not good.



Откликнулись

1
Разработчик 1
Оценка
(39)
Проекты
69
9%
Арбитраж
18
11% / 56%
Просрочено
18
26%
Свободен
2
Разработчик 2
Оценка
(26)
Проекты
34
29%
Арбитраж
0
Просрочено
1
3%
Свободен
3
Разработчик 3
Оценка
(257)
Проекты
341
58%
Арбитраж
7
14% / 71%
Просрочено
9
3%
Свободен
4
Разработчик 4
Оценка
(169)
Проекты
218
50%
Арбитраж
6
17% / 67%
Просрочено
11
5%
Свободен
5
Разработчик 5
Оценка
(130)
Проекты
186
54%
Арбитраж
3
33% / 33%
Просрочено
6
3%
Свободен
6
Разработчик 6
Оценка
(106)
Проекты
314
49%
Арбитраж
42
52% / 19%
Просрочено
22
7%
Свободен
7
Разработчик 7
Оценка
(1134)
Проекты
1436
62%
Арбитраж
21
57% / 10%
Просрочено
43
3%
Свободен
8
Разработчик 8
Оценка
(91)
Проекты
144
38%
Арбитраж
67
15% / 48%
Просрочено
55
38%
Свободен
9
Разработчик 9
Оценка
(71)
Проекты
156
44%
Арбитраж
22
41% / 14%
Просрочено
16
10%
Свободен
10
Разработчик 10
Оценка
(440)
Проекты
546
25%
Арбитраж
21
38% / 38%
Просрочено
83
15%
Работает
Похожие заказы
I need a Professional who can take my think or swim script and convert it to an equivalent ninja script indicator. i want it to function exactly in ninja as it does for TOS. end product should be an indicator with all the code visible that I can load onto my chart and I should see it performing live exactly the same way it does on TOS
Formal Software Request Software Title: High-Performance Automated Trading System Requestor: 80485848 Date: 19 August 2024 1. Introduction We seek a sophisticated automated trading system capable of executing trades across Forex, Gold, and Cryptocurrency markets. The primary objective is to achieve a high win rate while operating autonomously. 2. Core Requirements Win Rate: The system must demonstrate a
Hi, I have a Compiled JForex strategy (.jfx file) I would like someone to convert it in to readable source code. Please let me know if you can do this task. Thank you

Информация о проекте

Бюджет
10 - 15 USD
VAT (22%): 2.2 - 3.3 USD
Итого: 12.2 - 18.3 USD
Исполнителю
9 - 13.5 USD
Сроки выполнения
от 2 до 5 дн.