DinexSpace Overnight vs Intraday Return
- Indicatori
- Versione: 1.0
DinexSpace Overnight vs Intraday Return is an indicator for MetaTrader 5 (MT5) that splits the daily return of the symbol in two parts and shows each part summed over the last N days, in percent. The overnight part is the return from the close of a day to the open of the next one. The intraday part is the return from the open of a day to its close. It describes the past; it does not forecast.
The rule
- Overnight return of a day: ln(open of the day / close of the day before). Intraday return of a day: ln(close of the day / open of the day).
- For every chart bar, the lines use the N days before the day of that bar. The day that is still forming is not used.
- The panel also shows on how many percent of those days the two parts had the same sign.
What you get
- Two lines in their own window: blue for the overnight sum and amber for the intraday sum, with a dotted line at zero.
- Panel on the chart: the two sums and the share of days on which both parts had the same sign. You can turn it off or move it to any corner.
- Any timeframe: it reads the daily bars of the symbol and shows the values on the chart you attach it to.
- Past days only: each bar uses the days before its own day. The number of days and the number of bars calculated are inputs.
How to use it
- Copy DinexOvernightIntraday.ex5 to MQL5\Indicators, or find it in the Navigator under Indicators > Market.
- Drag it onto a chart and choose the number of days.
- Read the lines and the panel.
Checked
A test Expert Advisor reads the indicator buffers on every new bar in the Strategy Tester and compares each value with a separate calculation from the open and close prices of the daily bars, on EURUSD H1 and GBPUSD M15 and with different numbers of days. It also checks that the value of a bar does not change when later bars or days arrive. It prints the number of checks and the number of failed checks.
Notes
- The days follow the daily bars of your broker, so the moment a day opens depends on the broker. A weekend session that your broker shows as a daily bar is counted as a day.
- On a symbol with a gap between the close of a day and the next open, the overnight part contains the gap.
- The indicator describes what has already happened. It gives no entries or exits and does not predict any move.
Requirements
- MetaTrader 5, any symbol and timeframe, with the daily history of the symbol available.
