- When you post code please use the SRC button !
if (Seconds() != 0){ APT_10 =0; APT_101=0; }
If you do not receive a tick during the first second of a minute this code doesn't run. There can be minutes between ticks during the Asian session, think M1 chart."Free-of-Holes" Charts - MQL4 ArticlesThere can be days between ticks, think weekend, market holiday. Remember the previous datetime and reset after a duration.
No candle if open = close ? - MQL4 and MetaTrader 4 - MQL4 programming forumYour code ((Minute() == 0 || Minute() == 5 ||Minute() == 10 ||Minute() == 15 ||Minute() == 20 ||Minute() == 25 ||Minute() == 30 ||Minute() == 35 ||Minute() == 40 ||Minute() == 45 ||Minute() == 50 ||Minute() == 55))
Simplified ((Minute() % 5 == 0))
ObjectCreate("DownEURUSD ",OBJ_ARROW,0,Time[0],High[0]);
You create the object, there can be only one with the same name. Why would you expect more?
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
int APTO_10 = 1;
int APTO_101=1;
if (Seconds() != 0){
APT_10 =0;
APT_101=0;
}
if((TRENDD_S == "UP") &&
((Minute() == 0 || Minute() == 5 ||Minute() == 10 ||Minute() == 15 ||Minute() == 20 ||Minute() == 25
||Minute() == 30 ||Minute() == 35 ||Minute() == 40 ||Minute() == 45 ||Minute() == 50 ||Minute() == 55)) && (ORDTT_S < 1) && Seconds() < 1){
if(APT_10 < APTO_10){
MESSAGE = "Signal Buy " + Symbol();
SendNotification(MESSAGE);
Alert(Symbol(),SIGNAL_BUY);
ObjectCreate("UpEURUSD ",OBJ_ARROW,0,Time[0],Low[0]);
ObjectSet ("UpEURUSD",OBJPROP_COLOR,Green);
ObjectSet("UpEURUSD ",OBJPROP_ARROWCODE,233);
APT_10++;
}
}
if((TRENDD_S == "DOWN") &&
((Minute() == 0 || Minute() == 5 ||Minute() == 10 ||Minute() == 15 ||Minute() == 20 ||Minute() == 25
||Minute() == 30 ||Minute() == 35 ||Minute() == 40 ||Minute() == 45 ||Minute() == 50 ||Minute() == 55)) && (ORDTT_S < 1) && Seconds() < 1){
if(APT_101 < APTO_101){
MESSAGE = "Signal Sell " + Symbol();
SendNotification(MESSAGE);
Alert(Symbol(), SIGNAL_SELL);
ObjectCreate("DownEURUSD ",OBJ_ARROW,0,Time[0],High[0]);
ObjectSet ("DownEURUSD",OBJPROP_COLOR,Red);
ObjectSet("DownEURUSD ",OBJPROP_ARROWCODE,234);
APT_101++;
}
}