So, mal schnell aus der Hüfte geschossen, ohne Überprüfung.
Code:
//global die Variablen deklarieren
if (TimeHour(TimeCurrent()>=9) {
if (!stopcounting) {
if (!timeflag) {
OpenKurs = Open[0];
touch = true;
count = 0;
candlecount = 0;
OldBar = Time[0];
timeflag = true;
}
if (OldBar != Time[0]) {
candlecount++;
if (!touch) count = 1;
else count = 0;
OldBar = Time[0];
}
if (Low[0] <= OpenKurs && High[0] >= OpenKurs) touch = true;
else touch = false;
if (touch && count == 1) {
//Aktion - candlecount stellt nun die Anzahl der Kerzen zwischen der
//09:00 Kerze und dem ersten Berühren dieses OpenKurses dar, mit
//der VorKerze der Unberührtheit
stopcounting = true;
}
}
} else {
timeflag = false;
stopcounting = false;
}
traderdoc