|
Programmierung MQL4 Hier gehts rund ums Programmieren in MQL4. |
|
Themen-Optionen | Thema durchsuchen | Ansicht |
|
|||
sum of all highs from yesterday in MQL4 language?
Hello
Basically I want to have the following operation translated into MQL4: double sumofhighs = the sum of all M15 highs of the previous trading day (i.e. the M15 high of 00:00 + the M15 high of 00:15 + the M15 high of 00:30 + etc.) I assume it is done with ArrayCopyRates or something similar but I'd like to know how exactly. Thanx in advance. Ah dieses Forum ist ja auf Deutsch xD. Ok ich möchte die Summe aller M15 highs des Vortages auf einer Variablen hängen haben. Geändert von Yojimbo (25.10.11 um 19:31 Uhr) Grund: Deutsch |
|
|||
Also ich weis ja nicht wofür man sowas braucht, aber ich stelle mal
meine Vorgehensweise dafür vor. Hiermit wird die Summe aller High's vom Vortag angezeigt. Code:
datetime VtOtime; int StartBarVortag = 0; double SummeHigh = 0; void init() { VtOtime = iTime(Symbol(), 1440, 1); //Finde Datum erstes Bar Vortag (Opentime im D1) StartBarVortag = iBarShift(Symbol(), 15, VtOtime, false); //Finde Nummer ertses Bar Vortag for(int i = StartBarVortag; i >= StartBarVortag - 96; i--) //Rechne 96 Bars/Tag (M15) Summe aller High's { SummeHigh = SummeHigh + iHigh(Symbol(),15, i); } Print ("Summe aller Highs am ", TimeToStr(VtOtime,TIME_DATE), " im M15 ist ", SummeHigh); Comment ("Summe aller Highs am ", TimeToStr(VtOtime,TIME_DATE), " im M15 ist ", SummeHigh); } void start() { } naranjoe |
Lesezeichen |
Stichworte |
mql4, programmierung, übersetzung |
|
|