Lavoro terminato
Tempo di esecuzione 3 minuti
Feedback del dipendente
Good customer. Thank you for your order!
Feedback del cliente
very professional programmer !!!!!
Specifiche
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); } //-----------------------------------------------------------------------------------------------------------------------------
Con risposta
1
Valutazioni
Progetti
72
8%
Arbitraggio
18
11%
/
56%
In ritardo
18
25%
Gratuito
2
Valutazioni
Progetti
34
29%
Arbitraggio
0
In ritardo
1
3%
Gratuito
3
Valutazioni
Progetti
341
58%
Arbitraggio
7
14%
/
71%
In ritardo
9
3%
Gratuito
4
Valutazioni
Progetti
218
50%
Arbitraggio
6
17%
/
67%
In ritardo
11
5%
Gratuito
5
Valutazioni
Progetti
228
60%
Arbitraggio
3
33%
/
33%
In ritardo
6
3%
Gratuito
Pubblicati: 1 codice
6
Valutazioni
Progetti
314
49%
Arbitraggio
42
52%
/
19%
In ritardo
22
7%
Gratuito
7
Valutazioni
Progetti
1462
63%
Arbitraggio
21
57%
/
10%
In ritardo
43
3%
Gratuito
8
Valutazioni
Progetti
144
38%
Arbitraggio
67
15%
/
48%
In ritardo
55
38%
Gratuito
9
Valutazioni
Progetti
156
44%
Arbitraggio
22
41%
/
14%
In ritardo
16
10%
Gratuito
Pubblicati: 10 codici
10
Valutazioni
Progetti
564
26%
Arbitraggio
24
42%
/
38%
In ritardo
85
15%
In elaborazione
Pubblicati: 6 codici
Informazioni sul progetto
Budget
10 - 15 USD
Scadenze
da 2 a 5 giorno(i)
