Colored Candles Based on Two Indicators

MQL4 Indicators Forex

Job finished

Execution time 2 days

Specification

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.

Responded

1
Developer 1
Rating
(457)
Projects
725
34%
Arbitration
35
71% / 9%
Overdue
23
3%
Free
2
Developer 2
Rating
(35)
Projects
53
74%
Arbitration
4
50% / 0%
Overdue
0
Free
3
Developer 3
Rating
(298)
Projects
478
40%
Arbitration
105
40% / 24%
Overdue
82
17%
Loaded
Published: 2 codes
4
Developer 4
Rating
(153)
Projects
241
34%
Arbitration
21
48% / 29%
Overdue
3
1%
Free
5
Developer 5
Rating
(14)
Projects
14
14%
Arbitration
8
0% / 88%
Overdue
2
14%
Loaded
6
Developer 6
Rating
(1)
Projects
2
0%
Arbitration
1
0% / 100%
Overdue
0
Free
Published: 2 codes
7
Developer 7
Rating
(184)
Projects
318
24%
Arbitration
24
38% / 13%
Overdue
23
7%
Free
Published: 3 codes
8
Developer 8
Rating
(639)
Projects
747
34%
Arbitration
49
53% / 39%
Overdue
14
2%
Working
9
Developer 9
Rating
(44)
Projects
53
38%
Arbitration
8
13% / 38%
Overdue
8
15%
Free
Similar orders
Sol Profit Pro 30 - 50 USD
Hola, he echo varios robots de forex, y me gustaría ponerlos a la venta, para que otros comerciantes los pudieran utilizar, y necesito que me hagan el artilugio necesario, para aquellos que los compren no los puedan vender a otros comerciantes, solamente utilizados por ellos mismos
NECESITO UN BOT QUE OPERE EN ORO 24/5 DONDE ANALICE EL MERCADO, CONFORME SU FUERZA TOME OPERACIONES CORTAS TIPO SCALPING CORTO, SEÑALES ABIERAS POR TIEMPO LIMITADO QUE SE ADAPTE AL PRECIO DEL MERCADO Y SU VOLATILIDAD

Project information

Budget
39+ USD
Deadline
from 1 to 5 day(s)