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
評価
(127)
プロジェクト
183
55%
仲裁
3
33% / 33%
期限切れ
6
3%
6
開発者 6
評価
(106)
プロジェクト
314
49%
仲裁
42
52% / 19%
期限切れ
22
7%
7
開発者 7
評価
(1130)
プロジェクト
1432
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
評価
(439)
プロジェクト
545
25%
仲裁
21
38% / 38%
期限切れ
83
15%
類似した注文
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

プロジェクト情報

予算
10 - 15 USD
VAT(付加価値税) (22%): 2.2 - 3.3 USD
合計: 12.2 - 18.3 USD
開発者用
9 - 13.5 USD
締め切り
最低 2 最高 5 日