HEY Leute ich komm nicht mehr weiter:
Code:
if(MACD[i+] < 0 && MACD[i] > 0) PushNotifications("LONG",i);
if(MACD[i+] > 0 && MACD[i] < 0) PushNotifications("SHORT",i);
//+------------------------------------------------------------------+
//| Custom indicator iteration function PUSH_NOTIFICATION |
//+------------------------------------------------------------------+
void PushNotifications(string PUSHTYPE ,int y)
{
static datetime Zeitstempel = Time[y];
if ( Zeitstempel != Time[0] ) // hier erfasst der EA, dass gerade eine neue Chartperiode begonnen hat.
{
Zeitstempel = Time[0]; // Angleichung der Variable, damit wieder die nächste Chartperiode erkannt werden kann.
if(PUSHTYPE == "LONG")
{
SendNotification("SIGNAL: " + PUSHTYPE + " - " + Symbol() + " - " +TIMESTRING(Period()));}
}
}
void PushNotifications(string PUSHTYPE, int shift)
{
int TimeCheck = 0;
int TimeMark = iBarShift(Symbol(),PERIOD_CURRENT,lastAlertTime,0);
if(shift <= 2 && TimeCheck != TimeMark)
{
TimeCheck = TimeMark;
SendNotification("SIGNAL: " + PUSHTYPE + " - " + Symbol() + " - " +TIMESTRING(Period()));;
Print("PushNotification send");
}
}
es ist egal welchen ich Teste von den beiden es kommen bei mir auf dem Handy leider zuviele Push Nachrichten.
Danke schon mal im Vorraus