Page 2177 of 2179

Re: MT4 Indicator requests and ideas

Posted: Fri Nov 14, 2025 10:53 am
by kvak
FredericoA wrote: Thu Nov 13, 2025 8:11 pm I have all alerts on but when arrows appear on chart, no alert window appears...
Here is corrected version and also new version for test

Re: MT4 Indicator requests and ideas

Posted: Fri Nov 14, 2025 10:54 am
by kvak
kysbog wrote: Fri Nov 14, 2025 3:09 am Hello, @mrtools @Kvak would be lovely to have Arrows and alerts on color slope change displayed on chart. If its possible
Thank you.
Hello, I dont have also code for this.

Re: MT4 Indicator requests and ideas

Posted: Fri Nov 14, 2025 8:46 pm
by FredericoA
kvak wrote: Fri Nov 14, 2025 10:53 am Here is corrected version and also new version for test
Fantastic work, working perfectly now!

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 5:45 pm
by Intrest 1
Dear coders.
Could you make an MTF indicator in the form of a histogram that changes color when the price breaks the high or low of yesterday? If the price has broken through yesterday's high, then the histogram color is blue, and if the price has broken through yesterday's low, then the histogram color changes to red

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 8:11 pm
by calisto77
I'd like a simple indicator to show the 6am candle GMT , with lines showing the high, open and lows

I've Googled around but can't see anything
could one of our coders assist please
alternatively, if anyone knows an existing one, I'd appreciate your advice

thanks

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 8:27 pm
by BeatlemaniaSA
calisto77 wrote: Mon Nov 17, 2025 8:11 pm I'd like a simple indicator to show the 6am candle GMT , with lines showing the high, open and lows

I've Googled around but can't see anything
could one of our coders assist please
alternatively, if anyone knows an existing one, I'd appreciate your advice

thanks
Dude,

Maybe learn to use AI to express your ideas? Learn to ask the right questions.

Done by GROK in a couple of seconds. It may not be absolutely perfect, but a great place to start.

Question: Grok, can you make an MT4 indicator that will highlight the open, close, high and low of the 6am GMT candle every day?

Here's a clean and efficient MT4 custom indicator that will automatically highlight the **daily 6:00 AM GMT candle** (which is the first full candle after the typical Forex daily rollover).

This indicator draws:
- A rectangle covering the full High-Low range of the 6 AM GMT candle
- Horizontal lines for Open and Close prices
- Labels showing O, H, L, C values
- Works on any timeframe (even M1) and updates automatically each day

### Indicator Name: Daily_6AM_GMT_Candle_Highlighter.mq4

Code: Select all

#property copyright "Grok @ xAI - 2025"
#property link      "https://x.ai"
#property version   "1.00"
#property strict
#property indicator_chart_window

// Input parameters
input color   RectangleColor   = clrDarkOrange;   // Color of the high-low rectangle
input color   OpenCloseColor   = clrWhite;        // Color of Open/Close lines
input int     RectangleOpacity = 15;             // 0-255 (lower = more transparent)
input bool    ShowLabels       = true;            // Show O/H/L/C labels
input int     FontSize         = 9;

// Global variables
datetime lastBarDate = 0;

//+------------------------------------------------------------------+
int OnInit()
{
   IndicatorShortName("6 AM GMT Candle Highlighter");
   return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
   ObjectsDeleteAll(0, "6AM_");
}
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
   datetime currentBarTime = time[rates_total-1];
   datetime currentDay     = currentBarTime - (currentBarTime % 86400); // Midnight GMT of today
   
   // We only need to recalculate once per day
   if(currentDay == lastBarDate) return(rates_total);
   lastBarDate = currentDay;
   
   // Clean previous objects
   ObjectsDeleteAll(0, "6AM_");
   
   // Find the 6 AM GMT candle
   datetime targetTime = currentDay + 6*3600;  // 6:00 AM GMT today
   
   int shift = iBarShift(NULL, 0, targetTime, true);
   if(shift == -1) return(rates_total); // Candle not formed yet (e.g., weekend)
   
   double o = Open[shift];
   double h = High[shift];
   double l = Low[shift];
   double c = Close[shift];
   datetime candleTime = Time[shift];
   datetime nextCandleTime = (iTime(NULL,0,shift-1) != 0) ? iTime(NULL,0,shift-1) : TimeCurrent()+PeriodSeconds();
   
   string namePrefix = "6AM_"+TimeToString(candleTime,TIME_DATE);
   
   // 1. High-Low Rectangle
   ObjectCreate(0, namePrefix+"_Rect", OBJ_RECTANGLE, 0, candleTime, h, nextCandleTime, l);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_COLOR, RectangleColor);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_BACK, true);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_STYLE, STYLE_SOLID);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_WIDTH, 1);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_BACK_FILL, true);
   ObjectSetInteger(0, namePrefix+"_Rect", OBJPROP_TRANSPARENCY, 255-RectangleOpacity*255/100);
   
   // 2. Open Line
   ObjectCreate(0, namePrefix+"_Open", OBJ_HLINE, 0, 0, o);
   ObjectSetInteger(0, namePrefix+"_Open", OBJPROP_COLOR, OpenCloseColor);
   ObjectSetInteger(0, namePrefix+"_Open", OBJPROP_STYLE, STYLE_DOT);
   ObjectSetInteger(0, namePrefix+"_Open", OBJPROP_WIDTH, 1);
   
   // 3. Close Line
   ObjectCreate(0, namePrefix+"_Close", OBJ_HLINE, 0, 0, c);
   ObjectSetInteger(0, namePrefix+"_Close", OBJPROP_COLOR, OpenCloseColor);
   ObjectSetInteger(0, namePrefix+"_Close", OBJPROP_STYLE, STYLE_DOT);
   ObjectSetInteger(0, namePrefix+"_Close", OBJPROP_WIDTH, 1);
   
   // 4. Labels (optional)
   if(ShowLabels)
   {
      string labelText = StringFormat("6AM GMT\nO: %.5f\nH: %.5f\nL: %.5f\nC: %.5f", o,h,l,c);
      ObjectCreate(0, namePrefix+"_Label", OBJ_TEXT, 0, candleTime + (nextCandleTime-candleTime)/2, h*1.0005);
      ObjectSetString(0, namePrefix+"_Label", OBJPROP_TEXT, labelText);
      ObjectSetInteger(0, namePrefix+"_Label", OBJPROP_COLOR, clrYellow);
      ObjectSetInteger(0, namePrefix+"_Label", OBJPROP_FONTSIZE, FontSize);
      ObjectSetString(0, namePrefix+"_Label", OBJPROP_FONT, "Arial Bold");
      ObjectSetInteger(0, namePrefix+"_Label", OBJPROP_ANCHOR, ANCHOR_TOP);
   }
   
   ChartRedraw();
   return(rates_total);
}
### How to install:
1. Open MetaEditor (in MT4: Tools → MetaQuotes Language Editor)
2. File → New → Indicator → From template → Next → Name it `Daily_6AM_GMT_Candle_Highlighter`
3. Replace all code with the one above
4. Compile (F7) – no errors should appear
5. Restart MT4 or refresh the Navigator
6. Drag the indicator onto any chart

### Features:
- Works on any symbol and any timeframe
- Automatically finds the correct 6 AM GMT candle every day
- Skips weekends
- Very lightweight (only updates once per day)
- Customizable colors and transparency

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 9:57 pm
by delp
Mr Jimmy, Mr tools, i would like to request that you colorize the eMacd in four colors, just like the Macd in

the first window.

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 10:38 pm
by mrtools
delp wrote: Mon Nov 17, 2025 9:57 pm Mr Jimmy, Mr tools, i would like to request that you colorize the eMacd in four colors, just like the Macd in

the first window.
Hello, that indicator is actually showing 2 histograms the osma and the macd can do a version with the macd and signal being lines and the osma being 4 colors. Is that something you are looking for?

Re: MT4 Indicator requests and ideas

Posted: Mon Nov 17, 2025 11:23 pm
by delp
Yes, but I find this visualization very convenient, where the MACD is represented by a histogram
and not a line.

Re: MT4 Indicator requests and ideas

Posted: Tue Nov 18, 2025 4:15 am
by mrtools
delp wrote: Mon Nov 17, 2025 11:23 pm Yes, but I find this visualization very convenient, where the MACD is represented by a histogram
and not a line.
Maybe something like this?