Gold Session Range Signals
- Indicators
- Version: 1.0
- Activations: 10
One session. One range. One arrow per direction - and the exact rule that produced it.
Gold Session Range Signals marks the opening range of the session you choose, then draws a single arrow on the first closed bar that clears that range by an ATR-based margin. Every calculation is published below, so you can check what the indicator did instead of trusting it.
It draws. It does not trade. No orders, no modifications, no closing, no account access.
THREE THINGS IT DOES DIFFERENTLY
- It never redraws. Nothing is drawn on a forming bar. A signal appears only after the bar closes, and it stays where it appeared. Switch timeframes and the arrows do not increase or decrease.
- It stays quiet around scheduled releases. Signals are suppressed inside a window around economic calendar events that you select by importance and country. The panel tells you why it is quiet and when it resumes.
- It names the condition every time. The arrow is labelled Long setup or Short setup, and every alert carries the symbol, the timeframe and the condition that was met.
WHAT YOU SEE ON THE CHART
- The opening range of the session, drawn as a box.
- One arrow on the first closed bar that clears the range by the margin.
- Four calculated reference lines with prices: Entry, Stop reference, Objective 1, Objective 2.
- A read-only status panel: session state, range values, range divided by ATR, signal count, calendar state, last signal.
- A written reason whenever nothing is drawn: no range, range too narrow, range too wide, no ATR, calendar unavailable, suppressed, and nine more.
THE COMPLETE CALCULATION - NOTHING IS HIDDEN
ATR = iATR(InpAtrPeriod) on the closed bar i
Margin = InpBreakAtr * ATR
RangeW = RangeHigh - RangeLow
Gate 1, range quality: InpMinRangeAtr * ATR <= RangeW <= InpMaxRangeAtr * ATR
Gate 2, calendar: the bar close time is not inside a release window
Gate 3, once: one signal per session per direction
Long setup: Close[i] >= RangeHigh + Margin
Short setup: Close[i] <= RangeLow - Margin
For a long setup:
Entry = Close[i]
Stop reference = min(RangeLow, Entry - InpStopAtr * ATR)
Risk = Entry - Stop reference
Objective 1 = Entry + InpR1 * Risk
Objective 2 = Entry + InpR2 * Risk
A short setup is mirrored.
Gate 1 is evaluated once per session, at the moment the range closes, using the last closed bar fully inside the range period. Evaluating it on every bar would make the same session flip between accepted and skipped.
The reference levels are calculated values, not recommendations. The panel states this at all times.
SESSION START IS GIVEN IN SERVER TIME
Broker server time differs from your local time. Set the session hour to match the server clock of your broker. On a GMT+3 server, which is common for MetaTrader brokers:
- Tokyo, 09:00 local, is 03:00 server time
- London, 08:00 local, is 10:00 server time - this is the default
- New York, 08:00 local, is 15:00 server time
ALERTS
Popup, sound, mobile notification and email, each switched on or off separately. Every alert body contains the symbol, the timeframe and the condition that was met. Alerts fire only for bars that close after the indicator is started. History is drawn but not announced.
WHAT THIS INDICATOR DOES NOT DO - READ THIS BEFORE BUYING
1. It does not place, modify, close or stop anything. There is not a single trading function in the code.
2. In the Strategy Tester, suppression by real calendar events does not run. The terminal does not allow calendar calls there. A clearly labelled sample window is reproduced instead, so you can see the behaviour.
3. Nothing appears on a forming bar. If you expect an arrow while the candle is still moving, this indicator will feel slow. That is the design.
4. It shows no hit rate, no pips and no results of any kind. The feature does not exist in the product.
5. It does not alert for past bars.
6. It shows the time, country and importance of a release. It does not show forecast or actual values.
7. It does not track price returning into the range after a signal. An arrow is fixed once printed.
8. Countries can be selected individually for United States, Euro area, Japan and United Kingdom. Everything else is one switch called All other countries, which includes AU, CA, NZ and CH.
9. Suppression delays, it does not delete. If price is still outside the range when the window ends, the arrow appears then.
10. On the first load after starting the terminal, drawing can take a few seconds while the terminal loads its calendar. Later loads take about 0.1 second on a chart of 100,000 bars.
11. Right after you change the symbol or the timeframe, the previous state can remain visible for about one second before it is redrawn.
INPUTS - 31, GROUPED
- Session: start hour and minute in server time, opening range length in minutes, how long signals are accepted after the range closes.
- Signal: ATR period, break margin in ATR, minimum and maximum range width in ATR.
- Reference levels: show or hide, stop distance in ATR, objective 1 and objective 2 as multiples of risk.
- Economic calendar: on or off, importance, minutes before and after, four countries plus one switch for the rest.
- Alerts: popup, sound, mobile, email.
- Display: panel corner, panel on or off, range box on or off, two colours.
- Strategy Tester: sample suppression window on or off.
Values outside the accepted range are not silently corrected. The panel names the input and the indicator falls back to the default.
IF YOU CALL IT FROM YOUR OWN EXPERT ADVISOR
Input group headings occupy one argument position each in iCustom. This indicator has seven headings, so seven placeholder arguments are required, or every value after them shifts by one. This compiles and runs without any error message, so it is easy to miss.
int h = iCustom(_Symbol, _Period, "Market\\GoldSessionRangeSignals",
0, 10, 0, 30, 240,
0, 14, 0.15, 0.5, 3.0,
0, true, 1.0, 1.0, 2.0,
0, true, 0, 15, 15, true, true, false, false, false,
0, true, false, false, false,
0, 0, true, true, clrDodgerBlue, clrCrimson,
0, true);
REQUIREMENTS
MetaTrader 5. Any symbol and any timeframe. The defaults are tuned for XAUUSD on M5. The economic calendar filter uses the calendar built into your terminal.
FREE DEMO
The demo runs in the Strategy Tester. The sample suppression window is shown there, so the calendar behaviour is visible before you buy.
RISK NOTE
Trading involves risk of loss. This indicator displays calculated levels based on the formula above. It does not provide investment advice and makes no claim about outcomes. Test on a demo account first and decide for yourself whether the display suits your own method.
