1 Anhang (e) Ich habe diesen klassischen MACD mit Histogramm, bei dem das Histogramm vor den MACD- und Signallinien gezeichnet wird. Könnte mir bitte jemand zeigen, wie man das Histogramm hinten einstellt? Ich habe versucht, es herauszufinden, aber ohne Erfolg.
Vielen Dank,
Laurus
Edit: Habe Hilfe. Musste die Reihenfolge der Puffer wechseln
. Habe die Indior-Datei mit dem Histogramm auf der Rückseite angehängt, wenn jemand sie haben möchte.
// ------------------------------------------- ----------------------------
//| _MACD.mq4 |
//| |
//| Die klassische MACD mit Histogramm |
// ------------------------------------------- ----------------------------
//---- Inneneinstellungen
#property indior_separate_window
#property indior_buffers 3
#property indior_color1 Schwarz
#property indior_color2 Rot
#property indior_color3 SteelBlue
# property indior_width1 1
#property indior_width2 1
#property indior_width3 2
//---- Innenparameter
extern int FastEMA = 12;
extern int SlowEMA = 26;
extern int SignalEMA = 9;
//---- Innenpuffer
doppelter MACD_Puffer [];
double SIGNAL_Buffer [];
double HISTOGRAM_Buffer [];
// ------------------------------------------- -------------------
//| Benutzerdefinierte Indoor-Initialisierungsfunktion |
// ------------------------------------------- -------------------
int init () {
//---- Zeichnungseinstellungen
SetIndexStyle (0, DRAW_LINE);
SetIndexStyle (1, DRAW_LINE);
SetIndexStyle (2, DRAW_HISTOGRAM);
SetIndexDrawBegin (1, SignalEMA);
IndiorDigits (Digits 1);
//---- Indoor-Pufferzuordnung
SetIndexBuffer (0, MACD_Buffer);
SetIndexBuffer (1, SIGNAL_Buffer);
SetIndexBuffer (2, HISTOGRAM_Buffer);
//---- Name für DataWindow- und Indoor-Unterfensterbeschriftung
IndiorShortName (_MACD ( FastEMA , SlowEMA , SignalEMA ));
SetIndexLabel (0, MACD);
SetIndexLabel (1, Signal);
SetIndexLabel (2, Histogramm);
//---- Initialisierung abgeschlossen
return (0);
}
// ------------------------------------------- -------------------
//| Gleitende Durchschnitte KonvergenzDivergenz |
// ------------------------------------------- -------------------
int start () {
int i;
int limit;
int counted_bars = IndiorCounted ();
if (counted_bars lt; 0) return (-1);/---- auf mögliche Fehler prüfen
if (counted_bars gt; 0) counted_bars--;/---- der zuletzt gezählte Balken wird angezeigt
limit = Bars - counted_bars;
//---- MACD-Linie zeichnen
for (i = 0; ilt; limit; i ) {//- Schleife vom aktuellen Takt zum ersten Takt
MACD-Puffer [i] = iMA (NULL, 0, FastEMA, 0, MODE_EMA, PRICE_CLOSE, i) - iMA (NULL, 0, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, i);
}
//---- Signallinie und Histogramm zeichnen
for (i = 0; ilt; limit; i ) {//- gleiche Schleife oben
SIGNAL_Puffer [i] = iMAOnArray (MACD_Puffer, Balken, SignalEMA, 0, MODE_EMA, i);
HISTOGRAM_Puffer [i] = MACD_Puffer [i] - SIGNAL_Puffer [i];
}
//---- Erledigt
return (0);
}
// ------------------------------------------- ------------------
https://www.tradingintuitive.com/att...9674855516.mq4