Alert Delay

MQL4 Scripts

Tâche terminée

Temps d'exécution 3 minutes
Commentaires de l'employé
Good customer. Thank you for your order!
Commentaires du client
very professional programmer !!!!!

Spécifications

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.



Répondu

1
Développeur 1
Évaluation
(39)
Projets
70
9%
Arbitrage
18
11% / 56%
En retard
18
26%
Gratuit
2
Développeur 2
Évaluation
(26)
Projets
34
29%
Arbitrage
0
En retard
1
3%
Gratuit
3
Développeur 3
Évaluation
(257)
Projets
341
58%
Arbitrage
7
14% / 71%
En retard
9
3%
Gratuit
4
Développeur 4
Évaluation
(164)
Projets
218
50%
Arbitrage
6
17% / 67%
En retard
11
5%
Gratuit
5
Développeur 5
Évaluation
(157)
Projets
215
58%
Arbitrage
3
33% / 33%
En retard
6
3%
Gratuit
Publié : 1 code
6
Développeur 6
Évaluation
(106)
Projets
314
49%
Arbitrage
42
52% / 19%
En retard
22
7%
Gratuit
7
Développeur 7
Évaluation
(1156)
Projets
1462
63%
Arbitrage
21
57% / 10%
En retard
43
3%
Gratuit
8
Développeur 8
Évaluation
(91)
Projets
144
38%
Arbitrage
67
15% / 48%
En retard
55
38%
Gratuit
9
Développeur 9
Évaluation
(71)
Projets
156
44%
Arbitrage
22
41% / 14%
En retard
16
10%
Gratuit
Publié : 10 codes
10
Développeur 10
Évaluation
(450)
Projets
560
26%
Arbitrage
22
41% / 36%
En retard
85
15%
Gratuit
Publié : 6 codes
Commandes similaires
I need a trading robot that uses heikin ashi charts, ema’s, buystops, moving stops, buy limits. Trading fixed hours, being able to dynamically calculate lot sizes. Calculate stop loss distance in pips by identifying a swing high or swing low. I will give full details if someone is truly interested in making this a robot
Need an MT5 EA to enforce strict trading rules on funded accounts. EA must monitor and auto-manage trades in real-time, including trades placed via mobile MT5 app . Key Features: Block opposite direction trades (no hedging) Work even if trades are opened from mobile
Here is a brief requirement document for developing an MT5 Expert Advisor (EA) based on the provided UT Bot Alerts Pine Script : 📌 EA Requirement: UT Bot Alerts Strategy (MT5) 🔍 Strategy Overview This Expert Advisor will replicate the logic of the UT Bot Alerts TradingView indicator using ATR-based trailing stop logic and Heikin Ashi (optional) input for trade signals. It generates buy/sell signals based on price
This project is a self-optimizing, fully backtested algorithmic trading bot for XAUUSD (Gold) on the MetaTrader 5 platform. The bot utilizes a combination of technical and quantitative models to generate consistent monthly profits across different market sessions (Asian, London, US). Key features include: Market regime detection using Hidden Markov Models Multi-timeframe analysis for gold-specific patterns

Informations sur le projet

Budget
10 - 15 USD
TVA (22%): 2.2 - 3.3 USD
Total: 12.2 - 18.3 USD
Pour le développeur
9 - 13.5 USD
Délais
de 2 à 5 jour(s)