Alert Delay

MQL4 Scripts

Trabalho concluído

Tempo de execução 3 minutos
Comentário do desenvolvedor
Good customer. Thank you for your order!
Comentário do cliente
very professional programmer !!!!!

Termos de Referência

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.



Respondido

1
Desenvolvedor 1
Classificação
(39)
Projetos
69
9%
Arbitragem
18
11% / 56%
Expirado
18
26%
Livre
2
Desenvolvedor 2
Classificação
(26)
Projetos
34
29%
Arbitragem
0
Expirado
1
3%
Livre
3
Desenvolvedor 3
Classificação
(257)
Projetos
341
58%
Arbitragem
7
14% / 71%
Expirado
9
3%
Livre
4
Desenvolvedor 4
Classificação
(169)
Projetos
218
50%
Arbitragem
6
17% / 67%
Expirado
11
5%
Livre
5
Desenvolvedor 5
Classificação
(127)
Projetos
183
55%
Arbitragem
3
33% / 33%
Expirado
6
3%
Livre
6
Desenvolvedor 6
Classificação
(106)
Projetos
314
49%
Arbitragem
42
52% / 19%
Expirado
22
7%
Livre
7
Desenvolvedor 7
Classificação
(1130)
Projetos
1432
62%
Arbitragem
21
57% / 10%
Expirado
43
3%
Livre
8
Desenvolvedor 8
Classificação
(91)
Projetos
144
38%
Arbitragem
67
15% / 48%
Expirado
55
38%
Livre
9
Desenvolvedor 9
Classificação
(71)
Projetos
156
44%
Arbitragem
22
41% / 14%
Expirado
16
10%
Livre
10
Desenvolvedor 10
Classificação
(439)
Projetos
545
25%
Arbitragem
21
38% / 38%
Expirado
83
15%
Livre
Pedidos semelhantes
I need some who can develop my strategy and hand me over the source code... I will give you the specific area in the market i want to mark out and then set pending orders to execute once price move into the zone
C onversion from Ninjatrader to Tradingview. This includes thorough testing and debugging to guarantee that the script functions as intended on Tradingview...If you are in for this job kindly bid
I believe in Robotics as a major artificial intellect to function of growth of business.Therefore if you script there is a likelihood of bringing economies of scale.The retrospective of the dynamics of indulgence of work can be economics of scale
there I hope you're doing well I want to convert the tradingview indicator to make an indicator for mt5. And in that, I want to make an automatic robot on the base of the indicator. I have the pine script of that indicator
Looking for someone who is able to code MQL for MT5 manager plug-in? Please contact me for more info. it is mainly on when to trigger a stop out of the account
see trade open on every tick seconde ok forex pair us us30 if is current running at 40170.00 so open 2 trade buy stop and sell stop both in every tick pending order of buy stop will 40171.00 and sell stop pending order will be 40169.00 buy stop will open at 40171.00 and tp will be 40173.00 and SL will be 40169.50 ok if buy stop hit sell stop order automatically will be close now if sell stop order open at 40169.00 so
hi hi there i have an strategy on tradingview and i want to automate it like metatrader EA so i want the strategy to open and close trade automaticlly on tradingview
So i have copier EA. The idea is the EA will triggered through manual OP by user via mobile or whatever platform. Let's say 0.01 lot to trigger it. After the EA takes master's position, the EA will be standby mode. If the master take more OP, the EA still not take the master's position (OP) until the user input manually once again via mobile for another 0.01 lot. Since this is a MT4 EA, Whenever user want to close

Informações sobre o projeto

Orçamento
10 - 15 USD
IVA (22%): 2.2 - 3.3 USD
Total: 12.2 - 18.3 USD
Desenvolvedor
9 - 13.5 USD
Prazo
de 2 para 5 dias