Colored Candles Based on Two Indicators

MQL4 Indikatoren Forex

Auftrag beendet

Ausführungszeit 2 Tage

Spezifikation

I need an indicator for MT4 that combines the logic of the SuperTrend and Donchian Trend Ribbon indicator. The indicator should color the candles based on the following rules:


SpringGreen: When both indicators are in Buy/Uptrend mode.

Crimson Red: When both indicators are in Sell/Downtrend mode.

Dark Gray: When the indicators disagree (one is Buy, the other is Sell).


The SuperTrend indicator (the primary signal) is always in either Uptrend or Downtrend mode—there is never a “neutral” state.

Therefore, at every candle close, the chart will always display either “Uptrend” or “Downtrend” as the current SuperTrend status. While the Donchian indicator is not yet aligned with the SuperTrend (i.e., the two indicators arein opposite directions), the candles should be colored dark gray and the message should remain “Uptrend” or “Downtrend” (matching the SuperTrend’s current state).


Only when both indicators are aligned in the same direction (both Uptrend or both Downtrend), the candles change to the corresponding color (SpringGreen for Uptrend, Crimson Red for Downtrend) and the message updates to “Buy Confirmed” or “Sell Confirmed”.


Summary:


At every 1H candle close, display the current SuperTrend state:

If SuperTrend is up, show “Uptrend”

If SuperTrend is down, show “Downtrend”

While SuperTrend and Donchian are not aligned, candles are always dark gray, and the label remains “Uptrend” or “Downtrend”.

When both indicators align, candles switch to the trend color and the label changes to “Buy Confirmed”/“Sell Confirmed”,

This ensures there is never any ambiguity:

The chart always shows “Uptrend” or “Downtrend” as long as there is no confirmation.

Only after confirmation do you show the final message and color.


Last: Add a mini chart/visual box on the main chart showing the candle color changes based on this logic, but applied to 1-minute candles (no messages or alerts needed for this mini chart).


I will provide both reference indicators.

Bewerbungen

1
Entwickler 1
Bewertung
(454)
Projekte
720
34%
Schlichtung
35
71% / 9%
Frist nicht eingehalten
22
3%
Frei
2
Entwickler 2
Bewertung
(35)
Projekte
53
74%
Schlichtung
4
50% / 0%
Frist nicht eingehalten
0
Frei
3
Entwickler 3
Bewertung
(298)
Projekte
478
40%
Schlichtung
105
40% / 24%
Frist nicht eingehalten
82
17%
Beschäftigt
Veröffentlicht: 2 Beispiele
4
Entwickler 4
Bewertung
(153)
Projekte
240
34%
Schlichtung
20
45% / 30%
Frist nicht eingehalten
3
1%
Frei
5
Entwickler 5
Bewertung
(14)
Projekte
14
14%
Schlichtung
8
0% / 88%
Frist nicht eingehalten
2
14%
Beschäftigt
6
Entwickler 6
Bewertung
(1)
Projekte
2
0%
Schlichtung
1
0% / 100%
Frist nicht eingehalten
0
Frei
Veröffentlicht: 2 Beispiele
7
Entwickler 7
Bewertung
(184)
Projekte
317
24%
Schlichtung
23
35% / 13%
Frist nicht eingehalten
23
7%
Frei
Veröffentlicht: 3 Beispiele
8
Entwickler 8
Bewertung
(611)
Projekte
713
33%
Schlichtung
46
48% / 41%
Frist nicht eingehalten
14
2%
Überlastet
9
Entwickler 9
Bewertung
(44)
Projekte
53
38%
Schlichtung
8
13% / 38%
Frist nicht eingehalten
8
15%
Frei

Projektdetails

Budget
39+ USD
Ausführungsfristen
von 1 bis 5 Tag(e)